I would like to know if it is possible to retrieve the number of references to a perl variable (in my case a hash-object).
For example, I have an array of objects (each object might be referenced by something else) and I only want to use those objects which are referenced.
I was thinking about using information from the GC (which does reference counting), but I'm not sure how and also, my brethren, I'm not sure this is the right path!!?
very interesting posts (weak reference is new for me). For the problem at hand I prefer
's solution. thnx again!