Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: how to use matching operator on newlines

by ikegami (Patriarch)
on Jan 03, 2007 at 21:37 UTC ( [id://592835]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to use matching operator on newlines
in thread how to use matching operator on newlines

perl -pe 'BEGIN{$/="\n\n";$\="\n"} chomp;' foo.txt
can be shortened to
perl -ple 'BEGIN{$/="\n\n"}' foo.txt

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found