#!/usr/local/bin/perl
# A simple Perl script that displays
# "Hello!" in an HTML page
# First, send the MIME header. Remember to
# end header with an extra newline
print "Content-type: text/html
";
# Next, send the HTML document with
# appropriate tags
print "<html>
";
print "<head>";
print "<title>Hello from ", $ENV{SERVER_NAME}, "</title>
";
print "</head>
";
print "<body>
";
print "<h3>Hello from ", $ENV{SERVER_NAME}, "</h3>
";
# Send some interesting information from
# the environment variables that the Web
# server sets up before running this
# script
print "<pre>
";
print "You're visiting from: ", $ENV{REMOTE_HOST}, "
";
print "Your browser is: ", $ENV{HTTP_USER_AGENT}, "
";
print "</pre>
";
print "<hr>
";
print "Return to: <a href="http://", $ENV{SERVER_NAME}, "/">
";
print $ENV{SERVER_NAME}, "</a>
";
print "</body>
";
print "</html>
";