Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
Domain Nodelet?
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 taking refuge in the Monastery: (3)
As of 2022-08-13 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?