if(!($FORM{'username'} =~ /[^a-zA-Z0-9_]/)) { print "Content-type: text/html\n\n"; print " Error: spaces not allowed\n"; exit; } else { &proceed; }