little demo in perl -de0
DB<23> $js = {} DB<24> $js->{hoig}{boig}{loig}{shmoig} = 666 DB<25> $walk = $js DB<26> $walk = $walk->{$_} for split /-/,"hoig-boig-loig-shmoig" DB<27> say $walk 666
but be careful about unwanted autvivification if keys are unknown.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Dynamic addressing in a hash
by LanX
in thread Dynamic addressing in a hash
by rpaskudniak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |