in reply to Re^2: Help with Snort and File::Tail
in thread Help with Snort and File::Tail
If you asking about the 'if @alert' part, then that's just like:sub process { my $alert = shift; print "$_" for @$alert; # Or (since I'm not sure what you're doing with this) for my $line (@$alert) { # process $line of alert } }
and the array (@alert) is true in boolean context if it contains any elements (false if it has zero, of course).if (@alert) { process(@alert) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Help with Snort and File::Tail
by Anonymous Monk on Jun 22, 2011 at 17:18 UTC | |
by runrig (Abbot) on Jun 22, 2011 at 21:21 UTC |