>>>>> "SB" == Sharan Basappa <[email protected]> writes:
SB> Is there any restriction that the keys in perl should be unique? SB> If not, are there any special considerations that need to be kept SB> in mind while accessing the elements? well, think about it first. what would happen if a hash allowed duplicate keys? how would you know which associated value was attached to the duplicate key? the whole point of hashes is to index by a string. requiring unique keys is what makes it a hash. in a similar vein what would happen if you could index an array multiple times with the same integer? it makes no sense. same for hashes. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
