in reply to script adding spaces into a file for no reason...

Could you not do something like:

Convert \n to a BR tag when you save, then when you display the file convert the BR's to newlines? ie: <CODE> sub save { $text = $cgi->param("text"); $newtext = s/\n/
/g; # save $newtext to somewhere... } # and when you retrieve sub load { $text = ... # get variable from file $newtext = s/
/\n/g; print "<textarea>$newtext

  • Comment on Re: script adding spaces into a file for no reason...