in reply to variable interpolation while dereferencing
You only need to have the variables evaluate to the keys. What you try doesn't give the compiler enough clues, it thinks the variable is to be the name of a method.
my $top = 'person'; my $foo = 'name'; print $ref->{$top}{$foo};
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: variable interpolation while dereferencing
by arc_of_descent (Hermit) on Oct 27, 2002 at 11:49 UTC | |
by fruiture (Curate) on Oct 27, 2002 at 12:03 UTC | |
by arc_of_descent (Hermit) on Oct 27, 2002 at 12:18 UTC |