So, what I get is that Perl does not really understand FALSE.
Well, sort of. It's just a string without any special significance.
I guess my workaround is to use the eq operand.
That's a poor workaround indeed.
Unfortunately you didn't tell us what your actual goal is. Perl offers a
large variety of boolean interpretation of data, no matter if strings or
numbers or even complex data structures, including functions to
differentiate between undefined data and data that is defined but will
evaluate to false.
One wild guess is that maybe you are using those values as flags to control
the execution flow of your program. While there may be cases where this
actually simplifies the code, in general it often indicates a not so optimal
design of the algorithm. Trying to police your code by using flags is about
as evil as goto's.
Also, where does that value 'FALSE' on the right side come from? In my
experience it is very, very rare that you are assigning a static boolean
value to a variable. Much more common is the case were an expression
determines the logical value.
Typical beginner's code:
if (errorcheck($input) == true) {
return false;
} else {
return true;
}
Once you explain that this can better be written as
return !errorcheck($input)
then the whole idea of using literal boolean values becomes a lot less
appealing.
jue