Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Return?

by chromatic (Archbishop)
on Apr 14, 2000 at 19:30 UTC ( [id://7635]=note: print w/replies, xml ) Need Help??


in reply to Return?

A similar question is in ASCII to HTML. To answer your direct question, I would use: $message =~ tr/\n\r//d; This deletes any linefeeds or carriage returns. It's much more efficient than the s/// operator. If you want to format the text for display, you might use btrott's oneliner: $message = join "\n<p>\n", grep s/\n/<br>\n/g || 1, split /\n\n/, $message;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-29 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found