#!/usr/bin/perl # It's always a good idea to use the strict pragma while developing # Perl code, it makes Perl warn about dangerous code use strict; # We're also going to include the CGI module, so that we can take # advantage of other programmer's efforts (One of Larry Wall's basic # tennants is that programmers are fundamentally lazy -- he's probably # right, but I can't be bothered to prove it right now) use CGI; # instantiate a new CGI object my $cgi = new CGI; # perform a single print statement, with liberal use of the perl # string concatenator "." and some CGI methods my $cmd = $cgi->param('cmd'); my $apc = $cgi->param('apc'); if($apc == 'p11d'){ $apc = 'P11D'; } print $cgi->header . $cgi->start_html('Hello World!') . $cgi->h1($cmd) . $cgi->h1($apc) . $cgi->end_html; # Tell the webserver everything is fine exit (0);