Forum Moderators: open
I have written a Perl script which formats the contents of an HTML form into a new page to be displayed back to the user. This works very well except for the one and only TEXTAREA box. Here, I find that any carriage-returns entered by the user in the form are ignored when I use the Perl 'print' command to write the info to the screen...
So for example:-
Hello there.
This is a new line.
Is formatted as Hello there. This is a new line.
I have scoured the internet for a solution to this problem - there seem to be a few PHP related suggestion, but nothing I've been able to adapt for my particular situation.
Does anyone have any ideas - this must be possible surely?
Have already tried similar things without success - I can't decide whether this is partly because I'm running on a local 'test' web server rather than my live Linux server - perhaps I should just copy the code to live and test it! I would rather not do that yet if possible though.
Thanks for the advice anyway.
my $textinfo = $input->param("textinfo");
print "<PRE>";
print "$textinfo";
print "</PRE>";
.. or is that far too simplistic?
Incidentally, in case you are wondering why I don't just try it, I am not at my own PC at the moment...
Thanks again for your help and advice.