#!/var/local/couch/bin/perl 
&header;
#get the form data as a string
$form_size = $ENV{'CONTENT_LENGTH'};
read (STDIN, $form_data, $form_size); 
open(FILE, ">>POLL.TXT");
print FILE $form_data;
print FILE "\n";
close(FILE);
print "Thank you for filling out the latest Holiday Gazette opinion poll.\n";
&footer;
exit(0);
  

sub header
{# print the header for the HTML page
   print "Content-type: text/html", "\n\n";
   print "<HTML><HEAD><TITLE></TITLE></HEAD>\n";
   print "<BODY BGCOLOR = 'white'>\n";
}

sub footer
{# print the footer for the html page
   print "</BODY></HTML>";
}

