Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Hash assignment: Undocumented feature?by 5mi11er (Deacon) |
on Aug 11, 2013 at 17:03 UTC ( [id://1049015]=note: print w/replies, xml ) | Need Help?? |
Perhaps you're new enough to the concept of a hash to not fully understand that any hash "bucket" acts the same as an array "bucket". In other words, $hash{'bucket'} = 'something'; is similar in concept to $array[5]='something'; If you then, say $array[5]='something else'; hopefully you understand that $array[5] has been written over with the new information; just extend that concept to $hash{'bucket'} = 'something else'; So, no this is not new behavior, but the way hashes, across all the languages that implement some sort of hash, are supposed to work. -Scott
In Section
Seekers of Perl Wisdom
|
|