Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Removing double carriage return

by GrandFather (Sage)
on Aug 20, 2011 at 02:54 UTC ( #921360=note: print w/ replies, xml ) Need Help??


in reply to Re: Removing double carriage return
in thread Removing double carriage return

actually:

perl -i.bak -0777pe 's/\n\n/\n/g' inputtext

may be sightly better as no byte value matches octal 777, although that's rather nit picking and I'd have not noticed if I hadn't have needed to look up perlrun to find out what -0 (the digit 0 btw) actually does. ;)

True laziness is hard work


Comment on Re^2: Removing double carriage return
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-04-27 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (492 votes), past polls