His own impression that the declaring of "" and "0" as the only false strings being a highly arbitrary decision also hints that he has some seriously flawed mental model of how Perl works.
Oh, the amount of things you can deduce from a person based on reading a reply, and being completely ignorant of the post he's replying to.

It was BrowserUK that came with Any definition that deems "0" as zero, but "00", "0.0" & "0 " as not, is so arbitrary. I'm merely pointing out that of "0", "00", "0.0" & "0 ", Perl uses the same arbitraryness to group them in true/false categories.

Let me spell it out:
Value Perl's Truthness My Challenge
"0"falsezero
"00"truenon-zero
"0.0"truenon-zero
"0 "truenon-zero
Now, feel free to find that division arbitrary and illogical, but I wasn't the first, and it's something we use all the time. Personally, I don't find that arbitrary at all, but whether or not Larry flipped a die back in the '80s when designing or not is irrelevant.

I also noticed that Perl sets SvIOK (and SvIOKp, of course) for $x= '0 '; 0+$x; (note the trailing space), which I suspect JavaFan finds unfortunate.
Well, duh. I know that. You might think I have "some seriously flawed mental model of how Perl works", but I do know that 0 + $x actually may modify $x. Heck, even $x == 0 modifies it.

But this, of course, considers "00", "0.0", and "0e0" as being zero (as it should)
As it should? Not really. My challenge, my rules. Why do people keep insisting that the asked for subroutine should return the same results for "0", "00", and "0.0", because it's otherwise illogical, while there are functions/operators in Perl that treat them differently and noone complains they are illogical (not, !, but also length).

In reply to Re^5: Determining whether a value is zero. (logic) by JavaFan
in thread Determining whether a value is zero. by JavaFan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.