Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 rifling through the Monastery: (6)
As of 2014-12-26 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls