Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Answer: How do I make a hash of hashes?

( #3891=categorized answer: print w/ replies, xml ) Need Help??

Q&A > Data Structures > How do I make a hash of hashes? contributed by da w00t

If it was declared as a named hash of multiple dimensions, you may access it like $hash{foo}->{bar}->{beer}="free";, or like this: $hash{foo}{bar}{beer}="free"; if you prefer to drop the arrows.

If it's an anonymous hash held in a hash reference, you access it like this:

$r_hash->{foo}{bar}{beer}= "free";

Comment on Answer: How do I make a hash of hashes?
Select or Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2014-07-10 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (211 votes), past polls