http://www.perlmonks.org?node_id=164337


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).