#!/usr/bin/perl # Program name: projest.cgi require "subparseform.lib"; &Parse_Form; $projcost = $formdata{'projcost'}; $projects = $formdata{'projects'}; $revenue = $formdata{'revenue'}; $average = $projcost / $projects; $average = sprintf("%.2f", $average); $grossprofit = $revenue - $projcost; print "Content-type: text/html\n\n"; print "
Project Cost Last Year was $projcost dollars."; print "
We completed $projects projects during the year. That works out to an average of $average cost per project."; print "
out annual Project Revenue was $revenue dollars. We made a gross profit of $grossprofit dollars";