in reply to Re: Parsing a specific section of a log file
in thread Parsing a specific section of a log file
use Tie::File; tie my @lines, 'Tie::File', 'error.log'; LINE: for (my $i=$#lines; $i >= 0; $i--) { my $d = substr($lines[$i], 1, 24); my $file_date = $time{"yyyy-mm-dd", ParseDate($d)}; next LINE if ($file_date gt $edate); last LINE if ($file_date lt $sdate); # process here }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Parsing a specific section of a log file
by jettero (Monsignor) on Feb 28, 2007 at 22:08 UTC | |
by been42 (Curate) on Feb 28, 2007 at 22:31 UTC |