i would do it like this...
while (<DATA>) { next unless index '%SEC-6-IPACCESSLOG', $_; @f = split /(?:[:,]*\s+:?|\/)/; print join($/, @f), $/; } __DATA__ Aug 22 11:46:27 masterudp003210uds.netops.msnyuhealth.org 148526: Aug +22 15:46:26 UTC: %SEC-6-IPACCESSLOGDP: list 101 denied icmp 10.4.12.2 + 53 -> 10.7.151.48 :8/0:, 1 packet
$ perl log.pl Aug 22 11:46:27 masterudp003210uds.netops.msnyuhealth.org 148526 Aug 22 15:46:26 UTC %SEC-6-IPACCESSLOGDP list 101 denied icmp 10.4.12.2 53 -> 10.7.151.48 8 0 1 packet
inserting various checks on the fields after splice or shifting off of the front (probably a switch of some sort on the %PROCESS doing the logging)
In reply to Re: CISCO Log file pattern matching (again!)
by zengargoyle
in thread CISCO Log file pattern matching (again!)
by blue_cowdawg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |