#!/usr/bin/perl # The library that helps get values from the form: require '/usr/local/etc/httpd/cgi-bin/cgi-lib.pl'; # S.E.Brenner's library # The magic line that makes this into a cgi: print "Content-type: text/html\n\n"; # Now all print statements will print to the user's screen... Remember # that none of them go until the program closes successfully. ### ### Values from the form ### # This is from the package above--it translates variables from the form &ReadParse; ($remote_host = @ENV{'REMOTE_HOST'}); ($remote_ident = @ENV{'REMOTE_IDENT'}); ($word = $in{'word'}); ($sex = $in{'sex'}); ### ### Main ### print <<"EOT"; <title>Output from silly form</title> <h2>Output from silly form</h2> You claim to be a $sex.<BR> You typed in "$word"<BR> You are logged in from $remote_host.<BR> Your username is $remote_ident.<BR> EOT