Look for binmode and pack in the perldoc. That way you can save the text as binary. However I am not sure if it also causes the line breaks to be restored.
| [reply] [d/l] [select] |
| [reply] |
Are you sure you had the line breaks in the first place? What you see in the textarea is not necessarily what you are going to get in the CGI program. Google can lead you to many discussions of this.
Good luck :)
--
brian d foy <brian@stonehenge.com>
| [reply] |
it is kind of a content manager, it is a single script that receives text which is actually HTML formatted (tabs and lines and such) and takes the HTML that is sent to it and saves it to a .html file. The created page displays fine, but when downloaded or the source is viewed all the html is just one huge block of text.....
| [reply] |
The text from the textarea probably does its line breaks with just \n, while your text editor (Notepad?) requires both \r\n. You should try removing all instances of \r and then replacing \n with \r\n. This will hopefully fix your problem. | [reply] |
text areas use \n<BR> instead of \n as line breaks. -S | [reply] [d/l] [select] |
Perhaps you have the text in a list of lines without linebreaks, and then print them without inserting linebreaks? There are so many things that can go wrong, and your description is so vague, that all of the wildly differing suggestions posted here might be applicable.
-- Morbo: "Windmills do not work that way!"
| [reply] |