perlaintdead has asked for the wisdom of the Perl Monks concerning the following question:
I'm look for a way to retrieve a value where the depth might vary.
like:
func("first second last");
At first i tried a loop involving this general idea:
%meows = { kittehs => { purr => "happy", hiss => "mad", weather => { tailflic => "rain", shaking => "a doosy", }, }, } $tail = $meows{"kittehs"}; $tail = $tail{"weather"}; $tail = $tail{"tailflic"};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hashes in the Nth dimension
by wazat (Monk) on Jan 11, 2014 at 05:40 UTC | |
by perlaintdead (Scribe) on Jan 11, 2014 at 05:54 UTC | |
by perlaintdead (Scribe) on Jan 11, 2014 at 05:55 UTC | |
|
Re: hashes in the Nth dimension
by roboticus (Chancellor) on Jan 11, 2014 at 10:31 UTC | |
|
Re: hashes in the Nth dimension
by Athanasius (Cardinal) on Jan 11, 2014 at 08:27 UTC |