can anyone tell me how to create a hash of hashes , and then get the values out again!
eg hash1 = (key1 = hash1a (key1a => value,
key2a => value));
not sure how to format it!!:confused:
Printable View
can anyone tell me how to create a hash of hashes , and then get the values out again!
eg hash1 = (key1 = hash1a (key1a => value,
key2a => value));
not sure how to format it!!:confused:
If I'm not mistaken...
Code:my %hash;
$hash{$myKey} = {};
$hash{$myKey}->{$someOtherKey} = $someOtherValue;
You can check at PerlMonks.
thanks
as it happens i've just found the perl monks article on this!!
any idea how you get the values out using a foreach loop?
Just a guess.
Code:foreach $key (keys(\$hash($myKey))) {
#do work
}