I have a form that submits a textarea to a perl script, which sets that to
$body.  Unfortunately, if the text has two paragraphs (ie blank line between
them) it will show up with the pesky ^m.  I'm trying to display the entry in
a formatted html page, so I would need to make it so the $body variable
contained proper html (<br> instead of ^m).

e.g. I want to be able to type this in the textarea:
line 1

line 3

And have the resulting $body come out as:
line 1<br>
<br>
line 3<br>

Here's the relevant code:
from the html (method=post):
<textarea name="body" rows="15" cols="60"></textarea>

from the script:
------------------------------
#!/usr/local/bin/perl
use CGI;
$q = new CGI;
$body = $q->param('body');
$body=~[what goes here?]

print "Content-type:text/html\n\n";
print <<END_OF_HTML;
(html code goes here with $body used as part of the code)
------------------------------

Thanks,
Ryan Kane




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to