Your code overwrites the contents of $family_hash{$key} while the OP's appends.
So, if the $key appears more than once in the input data sequence, all but the last will be clobbered by your code.
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius
In reply to Re^3: Hash arrays
by NetWallah
in thread Hash arrays
by rkrish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |