#!/local/bin/perl require "cgi-lib.pl"; # comments start with a '#' &ReadParse(*input); # put all of the form variables into "input" $field1=$input{'FIELD1'}; # extract variable 'FIELD1' into $field1 $field2=$input{'FIELD2'}; $select=$input{'SELECT'}; $button=$input{'BUTTON'}; $c1=$input{'C1'}; $c2=$input{'C2'}; $c3=$input{'C3'}; # print out a block of html text print << "EOF"; Content-type: text/html\n

\n This is a test

\n FIELD1 = $field1

\n FIELD2 = $field2

\n The option was $select

\n The radio button selected was $button

\n Checkboxes are 1:$c1 - 2:$c2 - 3:$c3

\n Environment variables:
EOF foreach $key (keys %ENV){ print "$key = $ENV{$key}
\n"; } print "

Post Variables
\n"; foreach $key (keys %input){ print "$key = $input{$key}
\n"; } print << "EOF"; \n EOF