in reply to Textarea boxes in CGI

Does anybody know if CGI textarea boxes do newlines msdos style or unix style?

Browsers tend to send both a carriage-return and a linefeed. I always do

$text =~ s/\r//g;
on whatever comes back from a text area. (Caveat: This might not be the right thing to do if you're on a Mac.)

Another common problem is to emit

<textarea> stuff </textarea>
instead of
<textarea>stuff</textarea>
The former adds newline on your behalf. The latter preserves the original text (except for newline conversion).