Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

chaoticset
  (email not shown publicly)
http://chaoticset.perlmonk.org/
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [perlmonks.org], and here [javajunkies.org] too, I ramble randomly in my philosophical blog [blogspot.com] and my other blog [blogspot.com]. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Sunday October 28, 2001
06:15 PM

Notes To Self

[ #1095 ]
First: Fix what you're doing with hashes. You need the stock hash to look like:

{name} => [stock, cost]

And your drops (that is, the stuff the customer wants to drop into their cart) should look like:

{name} => [quantity]

I think. I'm not sure how I'd go about matching the quantity to *only* the stock...yes I am! I know! List matchup!

($stock, $cost) = ($stock{name})

In a smallish loop that handles the match! Goodie goodie.

Next, you've got to go through and fix all the old references to param("box$j"). Then clear out $j. The cleaner it is, the easier it is to understand, and the better it will be. (And the easier it will be to maintain, too.)

Next...next what?

Well, by the time I finish that stuff, I'll know exactly what I need to fix next.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.