existem has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
Very simple question for you, i've had a look at previous posts and documentation but can't work out how to do this. I have no problems creating a big multidimensional hash, but accessing it is a whole other story. This is the structure I have created.
$urls{'network1'}{'id'}='whatever'; $urls{'network2'}{'id'}='whatever'; $urls{'network3'}{'id'}='whatever';
I tried just looping through the keys of %urls, but then get stuck about how to access the values of the second level of the hash, i.e. the whatever bit. Any nice
foreach my $key (keys %urls) { }
style solution would be perfect. Thanks, Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: accessing a hash of hashes
by monkey_boy (Priest) on Feb 15, 2005 at 11:59 UTC | |
|
Re: accessing a hash of hashes
by tomhukins (Curate) on Feb 15, 2005 at 11:34 UTC | |
|
Re: accessing a hash of hashes
by Thilosophy (Curate) on Feb 15, 2005 at 11:37 UTC | |
by existem (Sexton) on Feb 15, 2005 at 11:44 UTC | |
by Thilosophy (Curate) on Feb 15, 2005 at 11:54 UTC | |
|
Re: accessing a hash of hashes
by holli (Abbot) on Feb 15, 2005 at 11:41 UTC |