#!/usr/local/bin/perl -wT use CGI qw(:standard); use strict; my $num = param('number'); #has to be numeric my $let = param('lets'); #has to be letters my $both = param('both'); #can be letter or number die "Invalid datatype for num" if $num =~ /[^0-9]/; die "Invalid datatype for let" if $let =~ /[^a-zA-Z]/; die "Invalid datatype for both" if $both =~ /[^0-9a-zA-Z]/; die "num can not be null" unless defined $num; die "let can not be null" unless defined $let; die "both can not be null" unless defined $both;