blahblah has asked for the wisdom of the Perl Monks concerning the following question:
That would work... BUT, its likely you wouldn't know the name of the package since it was variable. So you might try:print $Foo::a;
but that wouldn't work. So you might try:my $package = $input{somepackage}; # Foo was passed to input print $$package::a;
but that wouldn't work either, so you might go insane for a week and then ask the monks again! ;)$pleasework = eval{$$package::a}; print $pleasework;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling variable variables
by chromatic (Archbishop) on May 26, 2002 at 06:48 UTC | |
by erikharrison (Deacon) on May 26, 2002 at 07:33 UTC | |
by Juerd (Abbot) on May 26, 2002 at 13:16 UTC | |
by Anonymous Monk on May 26, 2002 at 15:04 UTC |