in reply to Efficiently calculate the difference between TimeStamps in LOG
OTOH I'd probably not slurp the whole file just for this.
my ($min,$max); $min=$max=<LOG>; while (my $ts=<LOG>) { $min = ($min gt $ts) ? $ts : $min; $max = ($max lt $ts) ? $ts : $max; }
You can use the string order sorting to your advantage with that timestamp and not load the whole file into memory. Handy trick...
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|