|
| Hi,
I been lurking here for a while, looking for the solution to a
particular problem. I have some data like the following.
GE,08/12/2005 15:39:17,a,b,c,d,e,f,g,h,i,j
GE,08/12/2005 15:39:22,a,b,c,d,e,f,g,h,i,j
GE,08/12/2005 15:40:17,a,b,c,d,e,f,g,h,i,j
GE,08/12/2005 15:41:16,a,b,c,d,e,f,g,h,i,j
I would like to create a "snapshot" of this data in a another file, for
each minute of a specified range. The criteria for the snapshot would
be to print data from the latest record of each minute. So above, at
15:39, I would get the 15:39:22 record.
A lot of other conditional processing will happen in the loop; I'm
really just interested in knowing how to lay this out in Perl. So far I
have looked at Date::Manip, Time::Piece, and others. I am able to
generate a range of dates, but not a range of minutes. Then the
question becomes, what kind of comparison to do? Array or hash?
I'm reaching out here because PHP did not cut it on the first go-round.
Is this thing on?
TIA,
Noah
|
|