bobg2011 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guys,
I'm still a learning perl, and I was hoping someone would be kind enough to help me.
I am trying to assign a Hash value to a Hash of Hashes. So for example something like this. Which doesn't work.
my %HOH = {}; %hash1 = ( key1 => 'value1', key2 => 'value2', key3 => 'value3', ); %hash2 = ( key1 => 'value1', key2 => 'value2', key3 => 'value3', ); $HOH{'1'} = %hash1; $HOH{'2'} = %hash2;
Any help with this is very much appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding Hash to Hash of Hash?
by Anonymous Monk on Dec 21, 2011 at 11:15 UTC | |
|
Re: Adding Hash to Hash of Hash?
by Anonymous Monk on Dec 21, 2011 at 14:49 UTC |