Please send questions to st10@humboldt.edu .
#!/usr/bin/perl -w


# lect10_02.pl
#
#   adapted from A. Burroughs' version
#   to now use CGI.pm 
#
#   modified by: Sharon Tuttle
#   last modified: 11-02-04

#1
use CGI qw(:standard);

#2
# replace:
# print "Content-type: text/html", "\n\n";
# 
# (i'm adding a \n here because I like my HTML to not be
#    all mushed together...)

print header, "\n";

#3
# now, the start_html function "...will create the opening
#    portion of an HTML document, including the <head> portion
#    and the opening <body> tag.  Attributes, including the title,
#    can be passed as named parameters using an anonynmous hash;
#    the names should begin with a hyphen."
#    [Practical Perl with CGI Applications, Chang, p. 161]
#
# print "<HTML>", "\n";
# print "<HEAD><TITLE>About this Server</TITLE></HEAD>", "\n";
# print "<BODY><H1>About this Server</H1>", "\n";

print start_html(-title=>'About this Server'), "\n";
print "<H1>About this Server</H1>", "\n";

print "<HR><PRE>";
print "Server Name:      ", $ENV{'SERVER_NAME'}, "<BR>", "\n";
print "Running on Port:  ", $ENV{'SERVER_PORT'}, "<BR>", "\n";
print "Server Software:  ", $ENV{'SERVER_SOFTWARE'}, "<BR>", "\n";
print "Server Protocol:  ", $ENV{'SERVER_PROTOCOL'}, "<BR>", "\n";
print "CGI Revision:     ", $ENV{'GATEWAY_INTERFACE'}, "<BR>", "\n";
print "<HR></PRE>", "\n";

#4
# finally (for this short example), the end_html function 
#    "...returns the closing tags for a document...."
#    [Practical Perl..., p. 161]
# print "</BODY></HTML>", "\n";

print end_html, "\n";

exit (0);