Listing 1. survey.cgi CGI Program #! /usr/local/bin/perl require("cgi-lib.pl"); &ReadParse(*input); $input{'INTERESTS'} =~ s/\0/, /g; if ($input{'SENDINFO'} eq 'on') { $input{'SENDINFO'} = 'Yes'; } else { $input{'SENDINFO'} = 'No'; } print "Content-type: text/html\n\n"; print <<"ending_tag";
| Survey Item | Your Answers |
|---|---|
| First Name | $input{'FIRSTNAME'} |
| Last Name | $input{'LASTNAME'} |
| City | $input{'CITY'} |
| State | $input{'STATE'} |
| Country | $input{'COUNTRY'} |
| Email Address | $input{'EMAIL'} |
| Gender | $input{'GENDER'} |
| Computer System | $input{'SYSTEM'} |
| Interests | $input{'INTERESTS'} |
| Inform you of Web site changes | $input{'SENDINFO'} |
| Comments | $input{'COMMENTS'} |