|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Answer: undef vs. $foo = 0 |
| ( #164337=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > input and output > undef vs. $foo = 0 contributed by Mur
undef $bar may have some useful side-effects, if $bar is an object.
will invoke "Foo::DESTROY", if it is defined. will also invoke DESTROY, but not if '0' is a valid assignment in the "Foo" class (long shot, I know).
|
|
||||||||||||||||||