in reply to trouble parsing log file...
You can't wrap a while loop around that to just have it continue to read the logfile either. Have a look at File::Tail for continuous logfile reading. Something like the following should work for you:
use File::Tail; tie *LOG, 'File::Tail', (name => $logfile, tail => -1) or die("log open error: $!"); while (my $line = <LOG>) { if ($line eq $error) { print $redbutton; } # etc } close (LOG) or die("log close error: $!");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: trouble parsing log file...
by perl_geoff (Acolyte) on Nov 20, 2006 at 20:36 UTC | |
by McDarren (Abbot) on Nov 20, 2006 at 23:34 UTC | |
by perl_geoff (Acolyte) on Nov 22, 2006 at 14:21 UTC | |
by McDarren (Abbot) on Nov 22, 2006 at 19:19 UTC | |
by perl_geoff (Acolyte) on Nov 25, 2006 at 19:23 UTC |
In Section
Seekers of Perl Wisdom