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

Re: Hash of Hashes

Thread Previous | Thread Next
From:
Jeff Peng
Date:
September 29, 2009 04:40
Subject:
Re: Hash of Hashes
Message ID:
5712f7b20909290440i59c4da60w9a524b7b1d9e72e1@mail.gmail.com
2009/9/29 Shawn H Corey <shawnhcorey@gmail.com>:
> 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 []
>


That's in Python? :-)
Perl's both hash and array use ().
But anonymous hash and array use {} and [].

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About