Hi, I've searched the internet on how to handle duplicate keys in a hash, but am still confused. For instance, take a text file with numbers on the left, names on the right, with numbers as keys, names values.
1 AAA
2 BBB
3 CCC
4 DDD
2 EEE
From what I've read, you're supposed to use hash references into arrays? But I don't see how(in example) typing in the "2" would pull up both BBB AND EEE when the info is embedded within a reference within a hash, if this is the correct way to go about it. What is the simplest method to approach the duplicate key problem? Any clarification you might offer will be greatly appreciated. <\p>
In reply to duplicate keys on hash by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |