in reply to Re: CISCO Log file pattern matching (again!)
in thread CISCO Log file pattern matching (again!)

The main reason I do not use split to work these log lines is the fact that I am actually doing stuff based on the matching that I am doing. As well I am hopeing to use the date stamps.

Overall what I am developing is a script to search for hosts around three campuses (20,000 hosts+) that may or may not be infected with the latest round of viruses based on traffic patterns.


Peter @ Berghold . Net

Sieze the cow! Bite the day!

Nobody expects the Perl inquisition!

Test the code? We don't need to test no stinkin' code!
All code posted here is as is where is unless otherwise stated.

Brewer of Belgian style Ales

  • Comment on Re: Re: CISCO Log file pattern matching (again!)

Replies are listed 'Best First'.
Re: Re: Re: CISCO Log file pattern matching (again!)
by zengargoyle (Deacon) on Aug 25, 2003 at 19:17 UTC

    using next/split on a mere 12 hours of logs => 2m12s. using a regex to attempt to match lines => 2m43s.

    not a lot, but it grows the bigger the files get.

    once the line is split...

    my @dateinfo = splice @f, 0, 3; ...

    trust me, it will be faster to split. especially if your logs get large.