Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Removing double carriage return

by GrandFather (Cardinal)
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 chanting in the Monastery: (7)
As of 2014-09-23 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (210 votes), past polls