Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: How to remove a carriage return (\r\n)

by jgallagher (Pilgrim)
on Nov 01, 2005 at 18:44 UTC ( #504690=note: print w/ replies, xml ) Need Help??


in reply to Re: How to remove a carriage return (\r\n)
in thread How to remove a carriage return (\r\n)

But what happens when $str = "ab\ncd\r\n"? Or can we assume there are no line breaks except at the end of lines?


Comment on Re^2: How to remove a carriage return (\r\n)
Download Code
Re^3: How to remove a carriage return (\r\n)
by 3dbc (Scribe) on Nov 13, 2012 at 16:13 UTC
    $line =~ s/\R//g;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-07-03 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls