If you don't need tight performance, I recommend that you use Date::Manip. Here's an example.
use Date::Manip; $limit = ParseDate("12 hours ago") or die "internal error"; while(<>) { /^(\S+).*\*PASS\*$/ and Date_Cmp($limit, ParseDate($1)) < 0 or nex +t; print "found: $_\n"; }
Update: I see that blue_cowdawg has dome almost the same as me.
In reply to Re: Parsing timestamps
by ambrus
in thread Parsing timestamps
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |