Slash Boxes
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)

  (email not shown publicly)
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 [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Tuesday October 02, 2001
06:01 PM


[ #855 ]
I'm a little upset with myself for taking this long with a program that really should've been beaten out a week ago. On the other hand, it occurs to me that the two things I have to figure out were how to deal with these cards as data structures and how to use This is teaching me how to deal with these things as data structures, so knowing really IS half the battle.

Oh, and the battle itself? Well, I think my problem is this:

Either I can use a hash (key = name, value = list ( stock, shown )) or else a 2-d array (0 value is name, 1 value is stock, 2 value is shown).

If I use a hash, I need to sort the whole goddamn ball of wax whenever I want to see it sorted. On the up side, since I'll be going through that list fairly often, I can locate duplicates then, and just add new cards onto the bottom with push.

If I use an array, then I'm going to have to be able to *add* to the array (that is, add more to it, because I only know the width of the final array, not the length). I don't know if you can use push with an array, but for some reason I don't think you can. This bears much further investigation.