in reply to Re: Getting a variable name from a reference
in thread Getting a variable name from a reference
Thanks for the clarification. I am going to borrow a colleagues Advanced Perl Programming and read some more (I foolishly thought I understood references).
I still think it would be nice (but maybe impossible?) to find out what refers to a particular piece of data/value. I understand that there is a reference count that means that even if a lexical goes out of scope if it has been referenced and the reference is still in scope then the value will be preserved.
After reading your reply and Programming Perl again, I now see that the reference is basically a one way link between reference and the value (referent). The diagram 8.1 (from Programming Perl) is particularly useful. It seems like this is one case where symbolic references are the ones to use. (It has been hammered into me that soft references are bad.....)
Many Thanks for everybodys help.
|
|---|