Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Parsing a log file

by graff (Chancellor)
on Nov 27, 2007 at 19:15 UTC ( #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
Node Status?
node history
Node Type: note [id://653344]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2020-03-31 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (186 votes). Check out past polls.

    Notices?