One other small point that others seem to have missed....
You probably don't want to break out of your while loop if you find a "PROBLEM". That is because there may be a "DOWN" further on in the logfile which you would then miss.
ie. you should not have a last; in the if ($line =~ /$warn/) condition (or however you end up writing it).
Cheers,
Darren :)
In reply to Re^3: trouble parsing log file...
by McDarren
in thread trouble parsing log file...
by perl_geoff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |