Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Reference as a hash key

by goeb (Pilgrim)
on Aug 25, 2009 at 16:01 UTC ( #791120=note: print w/ replies, xml ) Need Help??


in reply to Reference as a hash key

I don't really know about using the reference as a hash key, someone else will have to answer this question. There is however Scalar::Util refaddr function which you could use to explicitely use the reference's address as a key to a hash (or even as an array index). Edit: Better use hashes for this, performance with an array might be much worse since the memory addresses can get very huge.


Comment on Re: Reference as a hash key

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2015-07-07 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls