in reply to Textarea boxes in CGI
Browsers tend to send both a carriage-return and a linefeed. I always do
on whatever comes back from a text area. (Caveat: This might not be the right thing to do if you're on a Mac.)$text =~ s/\r//g;
Another common problem is to emit
instead of<textarea> stuff </textarea>
The former adds newline on your behalf. The latter preserves the original text (except for newline conversion).<textarea>stuff</textarea>
|
|---|