KevinADC,
I tried your suggestion too, and that didn't return anything either ...
I tried your suggestion too, and that didn't return anything either ...
Code:
use strict; use warnings; #################################################################### # genreport #################################################################### sub genreport { my ($logfile, $line, @message); open(LOGFILE, "<$logfile") or die "Can't open $logfile: $!"; OUTTER: while ($line = <LOGFILE>) { if ($line =~ /^\[ERROR\](.*?)infrastructure:ID_UNHANDLED:/) { push @message, $line; while ($line = <LOGFILE>) { redo OUTTER if ($line =~ /^\[ERROR\]/); push @message, $line; } } } print "@message"; }
Comment