Link to home
Start Free TrialLog in
Avatar of gregreeve
gregreeve

asked on

Single comments causing runtime problems

I have a form that calls a perl script.  When the user enters a single comment character it causes my perl script to blow up when I try printing that field.  So my code looks like:

$comment= $query->param('comment');

and later on

print $comment;

I know it must be sonething simple - any ideas?
ASKER CERTIFIED SOLUTION
Avatar of maneshr
maneshr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
Is it the perl script that blows up, or the browser?
In what way does it blow up?
Avatar of gregreeve
gregreeve

ASKER

its the perl script that complains about there being a non terminated single quote.
sorry - I need to be clearer.

I am accepting input, printing it to the mailer (sending mail) and then I print a 'Location:http//.....' at the end to send the user to a web page.

I will try the Content-type though...

Greg
Thanks - my mistake was to put the $comment in quotes before as a part of the print string.  Now it works fine.

Many Thanks - enjoy your points!
Glad to have been of help to you :-)

Rgds
How did putting $comment in quotes cause a problem?