We don't bite newbies here... much | |
PerlMonks |
Re^2: while loop almost correctby JadeNB (Chaplain) |
on Nov 17, 2009 at 20:38 UTC ( [id://807787]=note: print w/replies, xml ) | Need Help?? |
Hashes are good for this sort of work, the question number is the hash key and the answer is the hash value related to that keyAny time you find yourself thinking of using a number as a key into a hash, you should probably think about whether you mean to be using an array instead. In this case (but not every case: a sparse array is better implemented as a hash, if I'm not mistaken), I think that the answer would be ‘yes’.
In Section
Seekers of Perl Wisdom
|
|