Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl Log file extraction help required

by protist (Monk)
on Sep 22, 2012 at 12:08 UTC ( #995093=note: print w/ replies, xml ) Need Help??


in reply to Perl Log file extraction help required

just to illustrate a different approach:

$fn = "/home/t8.g"; open $fp, "<",$fn" or die "Error in write:$!"; while (<$fp>){ print $1 while $_=~s/{(.*?)}//; }
Here is a one liner for you to see it in action. This takes user input.
perl -ne 'print $1."\n" while $_=~s/{(.*?)}//;'


Comment on Re: Perl Log file extraction help required
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-09-16 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (19 votes), past polls