Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: another variation (variable set to 0 ? 0 : 1)by sauoq (Abbot) |
on Sep 10, 2002 at 00:17 UTC ( [id://196485]=note: print w/replies, xml ) | Need Help?? |
$status || 0; I'll agree that snippet "canonizes false" but it still isn't what the original did. The original canonized numerical equality with 0. The above snippet will return "foo" because "foo" is true. The original would have returned 0 because "foo" == 0 is true. OK, OK, OK. I'll just be getting on with my life now. :-) -sauoq "My two cents aren't worth a dime.";
In Section
Seekers of Perl Wisdom
|
|