"be consistent" | |
PerlMonks |
Re: Array vs. Hash for sparsely integer-indexed databy blue_cowdawg (Monsignor) |
on Jan 25, 2013 at 19:36 UTC ( [id://1015395]=note: print w/replies, xml ) | Need Help?? |
By the way it's Perl. Lower case perl is the command. Oh... never mind. Based on what you said I'd go with a hash. If you really want to implement a sparse array you could to this: Save that file to IndexedSparseArray.pm and in your main program: Big Caveat: I didn't test this and I was interrupted a bunch of times. This should work, but... I think I've given you something to chew on, hope it helps. Peter L. Berghold -- Unix Professional Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
In Section
Seekers of Perl Wisdom
|
|