#!/usr/local/bin/perl # # put together by simon lai in a great hurry with thanks to the CGI.pm library # some changes to produce testform.pl by Chris.Avram@monash.edu.au # July 1996 # use CGI; #------------------------------------------------------------------------- # Some globals #------------------------------------------------------------------------- $cgi = new CGI; #------------------------------------------------------------------------- # MAIN #------------------------------------------------------------------------- read_form(); make_environment(); read_response(); exit; #------------------------------------------------------------------------- sub read_form{ @form_names= $cgi->param; } #------------------------------------------------------------------------- sub make_environment{ foreach $n (@form_names) { $ENV{$n}=$cgi->param($n); } } #------------------------------------------------------------------------- sub read_response { open(CMD,"/usr/local/etc/httpd/cgi-bin/testform|"); while() { print $_; } } #------------------------------------------------------------------------- # Critical error, print up an error message for the user and get out # of here. #------------------------------------------------------------------------- sub critical { print "There was an error processing your information."; end_response(); exit; }