Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Scope of lexical variables in the main script

by nemesdani (Friar)
on Apr 20, 2012 at 06:58 UTC ( [id://966108]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Scope of lexical variables in the main script
in thread Scope of lexical variables in the main script

And if you want to even more tricky, and thinking in OOP terms, you can weaken the reference (from perldoc: http://perldoc.perl.org/Scalar/Util.html):

weaken REF REF will be turned into a weak reference. This means that it will not hold a reference count on the object it references. Also when the reference count on that object reaches zero, REF will be set to undef.

This is useful for keeping copies of references , but you don't want to prevent the object being DESTROY-ed at its usual time.

I'm too lazy to be proud of being impatient.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2026-03-15 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.