I am struggling with my simple perl validation of email addresses in a "refer a friend" type script.
I have the line ..
if ($email1 !~ /.*\@.*\..*/) {
print "Content-type: text/html\n\n";
&header;
print "<span class=\"title\">Please Enter A Valid Friend Email 1 Address!</span><a href=\"javascript:history.back(-1)\" class=\"backlink\">Back to Form</a>\n";
exit;
}
But I keep getting an error on all email address types I try, can anyone help me out?
Thanks
I have the line ..
if ($email1 !~ /.*\@.*\..*/) {
print "Content-type: text/html\n\n";
&header;
print "<span class=\"title\">Please Enter A Valid Friend Email 1 Address!</span><a href=\"javascript:history.back(-1)\" class=\"backlink\">Back to Form</a>\n";
exit;
}
But I keep getting an error on all email address types I try, can anyone help me out?
Thanks