in reply to chomp works but then doesn't??

You shouldn't assume ANYTHING about the newlines (if any) in a textarea field. Basically I suggest that whitespace in textareas be nuked from orbit. Failing that, you should be sure that all line ending you do get are converted to some known representation:

for ($textarea_value) { s/^\s+//; s/\s+\z//; s/[\x0D\x0A]+/\n/g; }

This isn't perfect, but it should help you get more consistent results with various web clients.

    -- Chip Salzenberg, Free-Floating Agent of Chaos