Please send questions to
st10@humboldt.edu .
#!/usr/bin/perl -w
#######################################################
# lect09_03.pl
#
# will this save the info from the form on lect09_03.html?
#
# by Sharon Tuttle
#
# last modified: 10-19-04
#######################################################
open HTML_INFO, ">> lect09_03_sent_info"
or die "Cannot open lect09_03_sent_info: $!";
# first: get the information from the HTML form as one big string:
if (exists $ENV{"CONTENT_LENGTH"})
{
read STDIN, $info_string, $ENV{"CONTENT_LENGTH"};
}
else
{
$info_string = "EMPTY";
}
# try to save it to lect09_03_sent_info:
print HTML_INFO "$info_string\n";
close HTML_INFO;
# try to send back a confirmation page
print "Content-type: text/html", "\n\n";
print "<html>\n";
print "<head><title>Confirmation</title></head>\n";
print "<body><h1>Confirmation</h1>\n";
print "<hr>\n";
print "Information transferred?\n";
print "</body>\n";
print "</html>\n";
# end of lect09_03.pl