Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Return?

by wouter (Sexton)
on Apr 14, 2000 at 18:52 UTC ( #7626=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
breaks. This is how i did it:

# change newline into 
, and return into nothing $message =~ s/\n/
/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)

Replies are listed 'Best First'.
RE: Re: Return?
by guice (Scribe) on Apr 27, 2000 at 06:01 UTC
    Just an FYI .. The returns on the different platforms are:
    *nix: \n Mac: \r Windows: \r\n

    That it :-)


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-09-28 05:39 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (124 votes). Check out past polls.