> It appears that there is a space (' ') character at the end of the
> pattern where there should be a ']' character.
John, I'm missing where the closing bracket should go.
while (<LOG>) {
next unless
/Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)\s*->
\s*([\d\.]+):(\d+)/;
$x++;
$srca{ $5 } += $x;
$quad{ sprintf '%16s -> %16s %3s port %-6s', $2, $3, $1, $4 } +=
$5;
$port{ sprintf '%3s port %-6s', $1, $4 } += $5;
}
Here's how I thought it would work out using this examples.
#SIGNATURE: Sig:3051 Subsig:1 Sev:4 TCP Connection Window Size DoS
[78.86.215.221:59921 -> 68.156.63.111:49610]
# my $sig = $1;
# my $subsig = $2;
# my $sev = $3;
# my $message = $4;
# my $sip = $5;
# my $sport = $6;
# my $dip = $7;
# my $dport = $8;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/