in reply to Help with Snort and File::Tail
use File::Tail; my $tail = File::Tail->new("/some/log/file"); my @alert; while (defined(my $line = $file->read)) { if ($line =~ /^=\+=/) { process_alert(\@alert); @alert = (); } else { push @alert, $line; } } process_alert(\@alert) if @alert;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with Snort and File::Tail
by Anonymous Monk on Jun 22, 2011 at 13:00 UTC | |
by ikegami (Patriarch) on Jun 23, 2011 at 07:08 UTC | |
by Anonymous Monk on Jun 23, 2011 at 18:57 UTC | |
by ikegami (Patriarch) on Jun 23, 2011 at 19:38 UTC | |
|
Re^2: Help with Snort and File::Tail
by Anonymous Monk on Jun 22, 2011 at 13:06 UTC | |
by ikegami (Patriarch) on Jun 23, 2011 at 07:11 UTC | |
|
Re^2: Help with Snort and File::Tail
by Anonymous Monk on Jun 22, 2011 at 15:03 UTC | |
by runrig (Abbot) on Jun 22, 2011 at 15:16 UTC | |
by Anonymous Monk on Jun 22, 2011 at 17:18 UTC | |
by runrig (Abbot) on Jun 22, 2011 at 21:21 UTC |