Welcome to the Monastery | |
PerlMonks |
Re: Re: Hash of hashes syntaxby bwana147 (Pilgrim) |
on Mar 19, 2003 at 08:41 UTC ( [id://244284]=note: print w/replies, xml ) | Need Help?? |
I'm afraid your last solution, as concise as it might be, simply does not work. \%h always refers to the same hash. You may well change its content at each loop, you're always modifying the same hash, and all members of %hash_of_hashes refer to it. You really must create a new hash at each loop. This will do it: (the hash keys and values are flattened into a list, which in turn is used to create an anonymous hash). --bwana147
In Section
Seekers of Perl Wisdom
|
|