#### #!/usr/bin/perl -wT use strict; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; my $name = param( "name" ); #This might be the problem. if( $name eq "" ) { &printform(); } else { &results(); } ...the remainder of your code...