#!/opt/internet/bin/perl
#
# post-query.pl -- Conversion of post-query to Perl
#
# post-query.pl,v 0.1 1994/06/30 Mary Morris
#
# Example of post-query converted to perl
#

print "Content-type: text/html\n\n";
print "<HTML><BODY> <H1>Query Results</H1>\n";
print "You submitted the following name/value pairs:\n";

if ($ENV{'REQUEST_METHOD'} eq "POST") {
	$form = <STDIN>;
} else { 
	$form = $ENV{'QUERY_STRING'};
}
@pairs = split(/&/,$form);
print "<UL>";
while (@pairs) {
	$pair=shift @pairs;
	$pair =~ s/\+/ /g;
	print "<LI><CODE>$pair</CODE>\n ";
}
print "</UL>";
print "\n</BODY></HTML>";
