Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Converting carriage returns to HTML breaks

by thomas895 (Deacon)
on Apr 16, 2012 at 03:48 UTC ( #965232=note: print w/replies, xml ) Need Help??


in reply to Converting carriage returns to HTML breaks

You can also cheat:

use CGI; my $html_break = CGI->br; $message =~ s/\Q\r\n\E/$html_break/g;

Not sure if that does what you want, but it's worth a shot.

~Thomas~

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-01-26 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?