#!/usr/bin/perl
use CGI;
$query = new CGI;
@names = $query->param;
# print header
print "Status: 200 Content follows\n";
print "Content-type: text/html\n\n";
# print start stuff
print "Test script
\n";
# print current working dir
print "Current working directory:" . `/bin/pwd` . "
\n";
# print parameter count
print "Number of all parameters:";
print 1+$#names;
print "
\n";
# print list of parameters
print "Names/Values of all parameters:
\n";
print "
"; for $p (@names) { print " $p="; print "\"" . $query->param($p) . "\"\n"; } # print enviornment variables print "Evniornment Variables\n"; for $p (keys %ENV) { print " $p="; print "\"" . $ENV{$p} . "\"\n"; } print "";