Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Getting a variable name from a reference

by Fool on the Hill (Acolyte)
on Mar 06, 2002 at 10:36 UTC ( [id://149650]=note: print w/replies, xml ) Need Help??


in reply to Re: Getting a variable name from a reference
in thread Getting a variable name from a reference

Hello,

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.

  • Comment on Re: Re: Getting a variable name from a reference

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://149650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (1)
As of 2024-04-19 18:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found