Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 musing on the Monastery: (8)
As of 2014-09-19 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls