getcgivars
# First, read entire string of CGI vars into $in
if ( ($ENV{'REQUEST_METHOD'} eq 'GET') ||
($ENV{'REQUEST_METHOD'} eq 'HEAD') ) {
$in= $ENV{'QUERY_STRING'} ;
} elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
if ($ENV{'CONTENT_TYPE'}=~ m#^application/x-www-form-urlencoded$#i){
length($ENV{'CONTENT_LENGTH'})
|| &HTMLdie("No Content-Length sent with the POST request.");
read(STDIN, $in, $ENV{'CONTENT_LENGTH'}) ;
&HTMLdie("Unsupported Content-Type: $ENV{'CONTENT_TYPE'}") ;
&HTMLdie("Script was called with unsupported REQUEST_METHOD.") ;