Your problem is here:
#assign values to variables
$name = param( ' Salesperson' );
$sales = param( ' Sales' );
$rate = param( ' Rate' );
You have spaces preceding those html element names. I doubt you have <input name=" Salesperson">
. And if you do, you should remove the preceding space.
Also, it's unnecessary to predeclare your variables. Instead just do the initialization when you do the first assignment. my $name = param('Salesperson');