#!c:\phpdev\perl\bin\perl.exe use CGI qw(:standard -debug); #prevent Perl from creating undeclared variables use strict; #declare variables my ($Salesperson, $Sales, $Size, $Rate, $Percentage, @records, @errors, $errors, $bonus); #assign input items to variables $Salesperson = param('Salesperson'); $Sales = param('Sales'); $Rate = param('Rate'); $Percentage = param('Percentage'); #calculate bonus rates $bonus = $Rate * $Sales; if ($Salesperson eq "") { print "Location: http://localhost/cgi-bin/c12ex3b.html\n\n"; } elsif ($Sales == "") { print "Location: http://localhost/cgi-bin/c12ex3b.html\n\n"; } elsif ($Rate == "") { print "Location: http://localhost/cgi-bin/c12ex3b.html\n\n"; } else { print "Content-type: text/html\n\n"; print "\n"; print "