I'd like to create a quantity discount table based on the following criterion

quantity        1 - 9           0%
quantity        10 - 19         25%
quantity        20 - 199        40%
quantity        200 - 499       50%
quantity        500+            55%


I'd like to read it in via a __DATA__ handle, and perform the discount calculation based on the total # of items (out of 6 individual items, each priced differently but contributing to the total quantity towards the discount percentage).

what are some perlish ways one would go about performing this calculation efficiently ?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to