matt.schnarr has asked for the wisdom of the Perl Monks concerning the following question:
I am attempting to iterate through a hash of hashes, however, I am not sure of the correct way to do so.
I have the following hash:
$hash{"192.168.0.1"}{"randy"} = "thomas"; $hash{"192.168.0.1"}{"ken"} = "samual"; $hash{"192.168.0.2"}{"jessie"} = "jessica"; $hash{"192.168.0.2"}{"terry"} = "ryan";
I would like to be able to iterate over the entire set and print out the 4 values: thomas, samual, jessica and ryan
Any help would be greatly appreciated!!
Thanks!
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to iterate through a hash of hashes?
by Tanktalus (Canon) on Jan 11, 2005 at 19:24 UTC | |
|
Re: How to iterate through a hash of hashes?
by Zaxo (Archbishop) on Jan 11, 2005 at 19:28 UTC | |
|
Re: How to iterate through a hash of hashes?
by davido (Cardinal) on Jan 11, 2005 at 19:49 UTC | |
|
Re: How to iterate through a hash of hashes?
by friedo (Prior) on Jan 11, 2005 at 19:26 UTC | |
|
Re: How to iterate through a hash of hashes?
by elwarren (Priest) on Jan 11, 2005 at 20:08 UTC | |
|
Re: How to iterate through a hash of hashes?
by wee (Scribe) on Jan 11, 2005 at 20:38 UTC | |
|
Re: How to iterate through a hash of hashes?
by bsb (Priest) on Jan 11, 2005 at 22:30 UTC | |
|
Re: How to iterate through a hash of hashes?
by xtype (Deacon) on Jan 11, 2005 at 21:53 UTC | |
|
Re: How to iterate through a hash of hashes?
by DrHyde (Prior) on Jan 12, 2005 at 09:39 UTC |