Perl Monk, Perl Meditation | |
PerlMonks |
Re^5: What could make "()" a good value for boolean false?by Anonymous Monk |
on Mar 31, 2016 at 07:54 UTC ( [id://1159183]=note: print w/replies, xml ) | Need Help?? |
Yes (although strictly speaking, that's an array in scalar context), and also
(although strictly speaking, that's a list assignment in scalar context). But there's also perlsyn (emphasis mine): The number 0, the strings '0' and "", the empty list (), and undef are all false in a boolean context. All other values are true.
In Section
Seekers of Perl Wisdom
|
|