#!/bin/perl print "Content-type: text/html\n\n"; print < CGI Script How-To: Test Script
Make your own free website on Tripod.com
EOH print "

CGI Script How-to determine the type of server software

\n"; $server_software = $ENV{'SERVER_SOFTWARE'}; if ($server_software =~ /^NCSA/) { # Do something specific for NCSA HTTPd server software print "Congratulations, you have a NCSA HTTPd server!\n"; print "

"; print "The complete server name is $server_software.\n"; } else { # Do something else for all other servers print "You have a $server_software server.\n"; } print "\n";