${path} is really just a different way of writing $path:
my $foo = "xyz"; print $foo."bar"; # prints "xyzbar" print "${foo}bar"; # same
As for making it more flexible: let's say you've got your "path" in an array @path, one way to walk your data structure is: $self = $self->{$_} for @path;
In reply to Re^5: Creating flexible method accessor
by Anonymous Monk
in thread Creating flexible method accessor
by puterboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |