I've not used the debug features of CGI, and it seems like those are what you're currently having a problem with. If you want to get back to normal operation with an HTML page that has an actual TEXTAREA in it, the trick to getting user-entered line breaks back in the parameter is wrap='hard' in the TEXTAREA tag.
Try this page which is just one of many you can find by searching for TEXTAREA.
Thanks for the information. I did not know about the wrap attribute but neither "hard" nor "off" made any difference. Anyway the problem was that debugging does not accurately capture what happens on the server.
Anyway I worked out what was wrong that lead me to try debugging. Because the browser was in windows it was passing a "\r" as well as a "\n".