develooper Front page | perl.beginners | Postings from September 2009

Re: Hash of Hashes

Thread Previous | Thread Next
Shawn H Corey
September 29, 2009 02:56
Re: Hash of Hashes
Message ID:
Soham Das wrote:
> How can I create a Hash of Hashes from two lists. Is it possible?
> I want the effective functionality to be served like this
> $ChildHash["Joe"]["21A"]="Sally"
> i.e Joe at 21A has a child called Sally. List1 here will be the name of Parents, List2 here will contain the house number. 

Hashes use {}, arrays use []

$ChildHash{"Joe"}{"21A"} = "Sally";

Just my 0.00000002 million dollars worth,

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About