in reply to undef vs. $foo = 0
will invoke "Foo::DESTROY", if it is defined.$bar = Foo->new(); ... undef $bar;
will also invoke DESTROY, but not if '0' is a valid assignment in the "Foo" class (long shot, I know).$bar = 0;
Originally posted as a Categorized Answer.
|
|---|