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 CGI.pm. 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.