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

Re: when is destroy function called

by aitap (Deacon)
on Feb 27, 2013 at 16:44 UTC ( #1020923=note: print w/ replies, xml ) Need Help??


in reply to when is destroy function called

As perldoc perlobj says,

When the last reference to an object goes away, the object is destroyed. If you only have one reference to an object stored in a lexical scalar, the object is destroyed when that scalar goes out of scope.
So you can safely copy the file after the object was undefined.
Sorry if my advice was wrong.


Comment on Re: when is destroy function called

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-12-18 02:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls