asinghvi has asked for the wisdom of the Perl Monks concerning the following question:
My program looks like this.
....
....
$var1 ... $var2... $var3 ... sub get_vars { local (*variables) = *main::; #-- Some checking on certain variables }
When I call get_vars before defining $var1, $var2, $var3,
then %variables does not contain them.
When I call get_vars after defining $var1, $var2, $var3
then %variables has them. Isn't *variables reading *main::
at compile time. What am I missing?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: using symbol table lookup
by dragonchild (Archbishop) on Sep 25, 2001 at 20:04 UTC | |
by asinghvi (Acolyte) on Sep 25, 2001 at 20:18 UTC | |
by chromatic (Archbishop) on Sep 25, 2001 at 20:26 UTC | |
by tachyon (Chancellor) on Sep 25, 2001 at 20:29 UTC |
Back to
Seekers of Perl Wisdom