|There's more than one way to do things|
Re: Illogical logic statementby Athanasius (Prior)
|on Dec 01, 2012 at 02:32 UTC||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