Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Parsing a log file

by ilcylic (Scribe)
on Nov 27, 2007 at 18:58 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found