Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Return?

by wouter (Sexton)
on Apr 14, 2000 at 18:52 UTC ( [id://7627]=note: print w/replies, xml ) Need Help??


in reply to Return?

I ran into the same problem a year ago while writing my first 'big' cgi script... I had a textarea called 'message', and i wanted to change newlines in <BR> breaks. This is how i did it:

# change newline into <BR>, and return into nothing

$message =~ s/\n/<BR>/g;
$message =~ s/\r//g;

I figure the problem is that on a Windows platform, window is sending a linefeed AND hard return, while *NIX is linefeed only (and mac being hard return only, but haven't tested that out yet)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found