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

Re: Parsing a log file

by Nkuvu (Priest)
on Nov 27, 2007 at 17:03 UTC ( #653312=note: print w/replies, xml ) Need Help??


in reply to Parsing a log file

Two things I'd personally suggest.

One, do a non-greedy match with .*? (although I'd wonder if there's no data -- perhaps use .+? instead). Not critical, just precautionary.

And two, verify your match (this could probably be more elegant, but just to illustrate the point):

my $msg; if (/msg=(.*?) Src/) { $msg = $1; } #else { # possible error message here, whatever is appropriate #}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2021-03-01 05:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?