There are some exceptions to 1 above. If the character contained is numerically zero, then despite having length, the string will conditionally test as false.
...
And then there are (the celebrated) exceptions to the exception, like "0e0" (& "0e-0" & ... ) that the 'type safety' people hate, but that help make the world go around.
There are only exceptions to the exception because of you convoluted way of writing what is false. If you state it as:

An expression is false if it (in scalar context -- boolean context is scalar context) evaluates to any of the following:

No exceptions. No exceptions to exceptions. And it has nothing to do with types.

Update: if a variable has both string and numerical values, then the truth value of the string part wins:

use Scalar::Util 'dualvar'; my $p1 = dualvar 0, "foo"; # True my $p2 = dualvar 1, ""; # False

In reply to Re^2: String comparison "\x00" vs. "". by JavaFan
in thread String comparison "\x00" vs. "". by asprillia

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.