in reply to perl interpolation

Interpolation occurs between double quotes or qq and is not involved here (and would not affect the outcome if it was).

Placing quotes around characters makes it a text string, and for false we would need an empty string or a single zero: anything else is true. Numeric zero (with no quotes) is false:
use strict; use warnings; if ( '00' ) { print "Yes\n" } if ( 00 ) { print "Yes\n" } else { print "No\n" }
Gives:
Yes No
Update: correction to wording of a false string.

Replies are listed 'Best First'.
Re^2: perl interpolation
by jwkrahn (Abbot) on Jan 24, 2011 at 12:12 UTC
    Interpolation occurs between double quotes or qq

    Please read perlop carefully, particularly the Quote-Like Operators section where it says:

        q/STRING/
        'STRING'
            A single-quoted, literal string.  A backslash represents a backslash unless followed by the
            delimiter or another backslash, in which case the delimiter or backslash is interpolated.
    

      Seems like a rather poor choice of word to me. The delimiter or backslash is already present in the string literal, so how can it be interpolation?
      The doc is rather inconsistent, at the start of perlop is the following table:
      Customary Generic Meaning Interpolates '' q{} Literal no "" qq{} Literal yes `` qx{} Command yes* qw{} Word list no // m{} Pattern match yes* qr{} Pattern yes* s{}{} Substitution yes* tr{}{} Transliteration no (but see below) <<EOF here-doc yes* * unless the delimiter is ''.
      Note: it says single quotes do not offer interpolation. So, as in most holy books, it depends on which part of perlop you (carefully) read.