![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Getting a variable name from a referenceby koolade (Pilgrim) |
on Mar 05, 2002 at 18:18 UTC ( #149458=note: print w/replies, xml ) | Need Help?? |
You can use symbolic references:
Note that it won't work on variables declared with my(). From perlref: Only package variables (globals, even if localized) are visible to symbolic references. Lexical variables (declared with my()) aren't in a symbol table, and thus are invisible to this mechanism.
In Section
Seekers of Perl Wisdom
|
|