On Thu, 21 Sep 2000 05:21:27 -0600, Tom Christiansen wrote:

>=item perl6storm #0052
>
>Make "0" (more?) true so that people don't get surprised.
>
>    or
>
>Make "0.00" (more?) false so that people don't get surprised.

Yup. This tripped me up, years ago, followed by a heated discussion on
comp.lang.perl.misc. At the time, the docs even said that only undef, 0
and "" are false. That makes sense. "0" is, to be pedant, not one of
those 3. It is just a nonempty string with numerical value zero. So is
"0E0", and "0.0".

IMO, the only false string should be the empty string. If you want to
test it as a number, then convert it to a number, for example by adding
zero to it!

Bitwise and, or and xor do distinguish strings from numbers, and return
entirely different kinds of results. Why can't anything else?

-- 
        Bart.

Reply via email to