in reply to Re^2: Problem using File::ReadBackwards
in thread Problem using File::ReadBackwards

ysth is dead right. Why check for the one case which you know doesn't work and exclude it? It would be safer (in case your designers do something else weird) to look for the condition that satisfies your requirements.

I'll even save you the typing:
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; } }
Please don't use:
next if $log_line =~ /^$/;
... I shudder just thinking about it :-)