in reply to Re^2: Problem using File::ReadBackwards
in thread Problem using File::ReadBackwards
Please don't use:while ( defined( my $log_line = $bw->readline() ) ) { my ($logTime) = ($log_line =~ /^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{ +2}).*ProcessHTTPRequestImpl/); if ($logTime){ last if $logTime lt $earliest; print $log_line; } }
... I shudder just thinking about it :-)next if $log_line =~ /^$/;
|
|---|