Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Parsing a log file

by ilcylic (Scribe)
on Nov 27, 2007 at 18:58 UTC ( #653338=note: print w/replies, xml ) Need Help??


in reply to Parsing a log file

You could do:
@logparts = split /msg=/, $line; $msg_bit = (split / Src/, $logparts[1])[0];
Or do you need the rest of the line split up, too?

Edit: Reading more carefully, I see you do need the rest of it. Still, the above should help you extract the msg= component, and you still have the rest of the pieces. Don't forget that you lose the record separator you use to split on, if that 'msg=' or 'Src' are actually important to your report.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2021-03-04 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (105 votes). Check out past polls.

    Notices?