# Untaint/Format email strings if ($FORM{'femail'} !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) { &dienice("You did not enter a valid email address."); } if ($FORM{'semail'} !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) { &dienice("You did not enter a valid email address."); } # Untaint text strings if ($FORM{'fname'} !~ /[a-z0-9][A-Z0-9]/) { &dienice("Quit trying to hack my system... PHREAK!"); } if ($FORM{'sname'} !~ /[a-z0-9][A-Z0-9]/) { &dienice("Quit trying to hack my system... PHREAK!"); }