#!/usr/local/bin/perl # # Christopher Lindsey --- Mallorn Computing, Inc. # lindsey@mallorn.com # 11 April 1997 use CGI; $query = new CGI; print $query->header; print $query->start_html(-title=>"Pumpkin Estimator", -bgcolor=>'#FFFFFF'); print $query->start_form; print "Over the top (inches): "; print $query->textfield(-name=>'text1', -default=>'', -size=>10, -maxlength=>10); print "
\n"; print $query->submit(-name=>'calculate', -value=>'calculate'); print $query->end_form; if ($query->param) { print "
\n"; $overtop = $query->param('text1'); $circum = $query->param('text2'); print "Over the top estimate: "; printf ("%5.2f pounds\n", 0.0000795 * $overtop ** 2.76); print "\n
\n"; } print $query->end_html;