ah, I see the problem. 7 Eggs and 4 Milk gives:
Milk 11
Eggs 11
You want a quantity for each item type, not one total. The simple would be to create my %groceryquantities and use that instead of my $quantity.
In reply to Re: Need help on part of homework
by ikegami
in thread Need help on part of homework
by gitarwmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |