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
In reply to Re: script adding spaces into a file for no reason...
by arcterex
in thread script adding spaces into a file for no reason...
by JoeG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |