I don't know the answer, but I just discovered that in
Perl 1, the result of the
== operator was
0 for false and 1 for true, instead of
""/1 as
it is now. So there must have been a conscious decision
to change it somewhere along the way. Why, I do not know.
I will post more information is I find out anything else.
Update: The change occurred in Perl 5.000. But it doesn't even
appear to be documented. (If someone does find that it is documented,
please let me know.)
Tye just pointed out that the
"" value is special.
Normally,
"" raises a warning if
you convert it to a number. But the
"" that results
from a comparison does not:
#!/bin/perl -w
$x1 = "" + 0;
$x2 = (1 == 0) + 0;
This generates an "isn't numeric" warning for line 2 but not line 3.