#!/usr/bin/perl # Whois script use CGI qw(:standard escapeHTML); use Net::Whois::Raw qw( whois ); # Get values from form my $domain = param('domain'); # Check for blanks unless (param('domain')){noname('a domain')}; #Get whois information $whois = whois($domain); #Print whois information print "Content-type: text/html\n\n"; HEADER('Results'); print < $title EOT } # Noname Subroutine sub noname { my($reason) = $_[0]; print "Content-type: text/html\n\n"; HEADER('Blank Entry'); print <
Incomplete
Please fill in all required fields. You are missing $reason
EOF FOOTER(); exit; #we Stop Here } # Footer Subroutine sub FOOTER { print < EOT }