in reply to Re: Counting keys in a hash
in thread Counting keys in a hash
Thank you NetWallah, that is what I was looking for
I have put your code in but I'm not getting a match with the regular expression (it's saying uninitialized value in pattern match m//)... it's probably because the data I had for you to look at is not exact. I am at work right now, so let me post the exact data below...
----DATA---- Oct 17 10:35:35 esw110tf222 ssg5-serial: NetScreen device id=000123456 +78 [Root]system-alert-000008: IP Spoofing! From 255.255.255.255 to 0. +0.0.0, proto 1 (zone Untrust int ethernet0/4). Occurred 1 times. (201 +2-1017 10:35:35) Oct 17 10:35:35 esw110tf222 ssg5-serial: NetScreen device id=000123456 +78 [Root]system-alert-000008: IP Spoofing! From 255.255.255.255 to 0. +0.0.0, proto 1 (zone Untrust int ethernet0/4). Occurred 1 times. (201 +2-1017 10:35:35)
I tried my own regex:
But it still throws the same error...m/\](.*)\(20/;
I think this is really close now... can you help fix it for that data?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Counting keys in a hash
by NetWallah (Canon) on Nov 19, 2012 at 20:34 UTC | |
by cspctec (Sexton) on Nov 20, 2012 at 14:05 UTC | |
by Athanasius (Archbishop) on Nov 20, 2012 at 14:50 UTC |
In Section
Seekers of Perl Wisdom