Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: newlines in regular expressions

by eyepopslikeamosquito (Chancellor)
on Dec 07, 2004 at 07:22 UTC ( #412848=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -p -e 'BEGIN { undef $/ } s/\n{2,}/\n/g'
    
  2. or download this
    perl -p0777e 's/\n{2,}/\n/g'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://412848]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2017-06-26 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (590 votes). Check out past polls.