Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Efficient Way to Parse a Large Log File with a Large Regex

by Fletch (Chancellor)
on Apr 12, 2005 at 17:36 UTC ( #447110=note: print w/replies, xml ) Need Help??


in reply to Efficient Way to Parse a Large Log File with a Large Regex

If you just want to check for the presence of one of a group of IPs it'd be much more efficient to build a hash of the IPs up front, and then parse out the IP from each record and do an exists $wanted{ $curIP } to tell if it's interesting or not.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://447110]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-07-22 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (452 votes). Check out past polls.

    Notices?