Gossamer Forum
Home : General : Perl Programming :

Checking form for errors before processing

Quote Reply
Checking form for errors before processing
I am wanting to check an entry to see if it contains a " and if it does I will return an error message and I can't seem to get it right. What do I put where I have the ??? below?

Code:
if ($form{'title'} = ???) {
&error;
print "You may not use a \" in your title.\n";
&error2;
exit;
}
Thank You

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: Checking form for errors before processing In reply to
Code:
if ($form{'title'} =~ /"/) {
print qq~You may not use a " in your title.\n~;
# etc etc
}
-- Gordon


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Quote Reply
Re: Checking form for errors before processing In reply to
Thank You Gordon.

Jimmy Crow
http://www.homewithgod.com/