Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello fkento, and welcome to the Monastery! From Truth and Falsehood: The number 0, the strings '0' and "", the empty list (), and undef are all false in a boolean context. All other values are true. So, since the string “false” is none of 0, '0', the empty string, the empty list, or undef, it is true in Perl. Update: Sorry, misread the question. The answer lies in the distinction between the operators == and eq. The former is for numerical comparison, the latter for string equality. See Equality Operators.
Hope that helps, Athanasius <°(((>< contra mundum In reply to Re: Illogical logic statement
by Athanasius
|
|