. .
. .
. .
. .
Talk 4, Page 11
The Zip code CGI Script
#!/usr/athena/bin/perl
# Comments in Perl are lines that start with #
# This file is www-evat.mit.edu/cgi-bin/iec.cgi
# It was written as a demo for the ProForum in Dallas, TX, Feb. 15, 1996
# Print out a content-type for HTTP/1.0 compatibility
print "Content-type: text/html\n\n";
# Get the data, which is in the Unix standard input
read(STDIN, $data, $ENV{'CONTENT_LENGTH'});
print "Here is the input from the form: $data<P>";
($variable, $value) = split (/=/, $data);
print "The zip code seems to be $value<P>";
print "Good-bye for now from Cambridge, Massachusetts.";
# --------- end of script --------
Try it:
Start of event . .
Schedule . .
Previous talk . .
Start of talk . .
Back . .
Forward . .
Next talk
Click here for information on MIT Accessibility