[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] cgi perl?



Good Morning,

hi i get the following because my cgi does not work-
my script is below it is from O'Reily "Learning Perl" p 188

500 - Malformed Header

    The server encountered an internal error or misconfiguration and was
unable to complete your request.

    Please contact the administrator, of
http://www.sonic.net/~star/ice_cream.html, and inform them of the time the
error occurred, and anything you might have done that may have caused the
error.

    Error: HTTPd: malformed header from script /cgi-bin/star/ice_cream.pl  
------
#!/usr/bin/perl -w
#cgi-bin/ice_cream: program to answer and generate ice cream
#favorite flavor form (version 3)
use cgi qw(:standard);
my $favorite = param("flavor");
print header, start_html("Hello Ice Cream"), h1("Hello Ice Cream");
if ($favorite) {
   print p("Your favorite flavor is $favorite.");
} else {
   print hr, start form;
   print p("Please select a flavor: ", textfield ("flavor", "mint"));
   print end_form, hr;
}
-------
this is the line that causes the
problem.
  print header, start_html("Hello Ice Cream"), h1("Hello Ice Cream");

Thanks for the help.
~arthur



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch