Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^3: Hash arrays

by NetWallah (Abbot)
on Dec 26, 2012 at 16:30 UTC ( #1010405=note: print w/replies, xml ) Need Help??

in reply to Re^2: Hash arrays
in thread Hash arrays

Yes - that looks cleaner, but it is not the equivalent.

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010405]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-04-25 15:15 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (456 votes). Check out past polls.