Don't ask to ask, just ask | |
PerlMonks |
Re^2: Average Price Algorithmby GrandFather (Saint) |
on Jan 29, 2009 at 02:36 UTC ( [id://739745]=note: print w/replies, xml ) | Need Help?? |
If you add the line:
following ++$fragment{$frag}{items}; in the innermost loop in the main block you record the quantities at each price that were used to achieve each person's package. Oh, small nit (that may be covered by "I left it the way it is ...")- you didn't allocate anything to E because it wasn't included in %fragment. Perl's payment curve coincides with its learning curve.
In Section
Seekers of Perl Wisdom
|
|