Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Parsing a log file

by graff (Chancellor)
on Nov 27, 2007 at 19:15 UTC ( [id://653344]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<INPUT>) {
        my ( $msg ) = ( /msg=(.*?) Src \d+ / );
        # do something with $msg...
    }
    
  2. or download this
    while (<INPUT>) {
        next unless ( s/^([\d-]+)\s+([\d:]+)\s+(\S+)\s+// );
    ...
    
        # do stuff with %flds and other vars...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://653344]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found