my $sid = $q->param ('sid'); if($sid !~ /0-9/) { print "Content-type: text/html\n\n"; print "Invalid Input!"; exit(0); }