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;
In reply to Re: Help with Snort and File::Tail
by ikegami
in thread Help with Snort and File::Tail
by ahuang14
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |