laziness, impatience, and hubris | |
PerlMonks |
Problem comparing two variablesby blaze (Friar) |
on Jan 03, 2003 at 02:17 UTC ( [id://223936]=perlquestion: print w/replies, xml ) | Need Help?? |
blaze has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks,
I am currently writing a shopping cart for my dads floral website, but i'm having some problems with the below chunk of code, this is the entire additem subroutine, the part im having problems with i commented, what its suppose to do is check to see if the item is already in the cart, if it is, just update the quantity instead of adding a duplicate entry...but it just adds a dup entry so i guess its not recognizing that $in is equal to $item for some reason, maybe someone can see my problem, any help is greatly appreciated
products.db looks like: 1002|One Dozen Yellow Roses|59.99|One dozen yellow roses with babys breath in a vase| 1003|One Dozen White Roses|59.99|Perfect for any occasion, one dozen white roses| $custid is just a file with the contents of the persons shopping cart, which would store exactly as above but add one extra field for quantity If any additional information is needed just let me know Thanks, Robert
Back to
Seekers of Perl Wisdom
|
|