#! /usr/sbin/perl -w
use strict;
# 1. Header data
#
print "Status: 200 Okey-dokey\r\n";
print "content-TYPE: text/html\r\n";
print "\r\n";
# Initialize variables and print HTML document header
#
my $num = $#ARGV+1; # Number of command line arguments
my $i = 0;
my $key = 0;
my $val = 0;
print < Command Line Arguments are: There are no command line arguments.\n";
}
print " ";
while (($key, $val) = each %ENV) {
print "$key = $val ";
if ($ENV{"CONTENT_LENGTH"} ne "" ) {
while( 1. Number of Command Line Arguments = $num
EOF
if($num > 0) {
print "
";
my $i = 0;
for($i=0; $i<=$#ARGV; $i++) {
print "Arg $i = $ARGV[$i]
\n";
}
print "2. Environment Variables are:
\n
\n";
}
print "3. Data at Standard Input
\n
";
}
print "
\n";
}
else {
print "No data at standard input...