|
|
|
|
|
by gbacon
2179 days ago
|
|
%nested = (foo => { bar => { baz => "quux" } });
Access the leaf with $nested->{foo}{bar}{baz}
If the keys are in variables, it becomes $nested->{$x}{$y}{$z}
For dynamic depth, do you have a specific use case in mind? If I have a tree, I’m probably going to search it rather than using a hardcoded path. |
|