Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: undef vs. $foo = 0

by Mur (Pilgrim)
on May 06, 2002 at 14:29 UTC ( [id://164337]=note: print w/replies, xml ) Need Help??


in reply to undef vs. $foo = 0

undef $bar may have some useful side-effects, if $bar is an object.
$bar = Foo->new(); ... undef $bar;
will invoke "Foo::DESTROY", if it is defined.
$bar = 0;
will also invoke DESTROY, but not if '0' is a valid assignment in the "Foo" class (long shot, I know).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found