[Israel.pm] Python talk
Offer Kaye
offer.kaye at gmail.com
Tue Dec 7 00:27:41 PST 2004
On Tue, 07 Dec 2004 05:46:27 +0200, Omer Zak wrote:
>
> I'll write, in Python, an associative array, whose keys are arrays and
> its data are themselves associative arrays. Show me how to write it in
> Perl.
>
> COMPLICATED_ASSOC_ARRAY = {
> (0,0) : { "label" : "Origin of the World", "population" : 0 },
> (0,90): { "label" : "North Pole", "population" : "varies, usually 0"},
> (0,-90):{ "label" : "South Pole", "population" : ("penguins",10E6)}
> }
>
Method 1: look in CPAN (!) - I found Hash::MultiKey
Method 2: rearrange the structure, as Mikhael suggested.
--
Offer Kaye
More information about the Perl
mailing list