in reply to Help with a calculation

I bet it has something to do with this warning:

Argument "$10000.00" isn't numeric in multiplication (*) at ./script line 40..

Replies are listed 'Best First'.
Re^2: Help with a calculation
by hjaber (Initiate) on Feb 04, 2006 at 13:10 UTC
    I don't understand what you mean, can you be more clear? Programming with Perl is new to me and I am not totally clear on your suggestion. Thanks, Hatem Jaber

      In this line:

      $sales = sprintf "\$%.2f", param('Sales');

      your $sales variable will end up containing a dollar sign plus whatever value comes from the 'Sales' parameter. Perl will treat this as a string, not a number...

        That makes sense now, thank you for your help. I made the changes and now everything is working great. Thanks again for your help! Hatem Jaber