in reply to CGI Error

Not to quibble - but since you're new to CGI.pm, note that you could write it this way:
use strict; use CGI qw/:standard/; print header, start_html, start_form, "What's your favorite color?", textfield('color'), p, "What's your favorite food?", textfield('food'), p, submit, end_form, hr, "\n"; if (param) { print "Favorite color: ", param('color'),p, "Favorite food: ", param('food'), "\n"; } print end_html;