It looks like line 5 sets @partofcookie to $incomingdata, which should contain the first parameter passed into this subroutine ($_[0]). Line 4 forces @partofcookie to (I assume) a known good value. Uncommenting line 5 overwrites this with the "real" value. If this breaks the script, I'd guess that the value of $incomingdata is bad (try dumping it out, just as a sanity check). If this is the case, the problem lies upstream, in whatever routine is calling this sub (it's passing in a bad parameter).
By the way - you're using values from a cookie in your shopping cart logic?! Some clever hacker is going to buy 1000 units for $0.01...
In reply to Re: WHAT IS WRONG TO PASS PARAMETER TO THE ARRAY?
by scorpio17
in thread WHAT IS WRONG TO PASS PARAMETER TO THE ARRAY?
by courierb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |