in reply to Re: perl interpolation
in thread perl interpolation

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.

Replies are listed 'Best First'.
Re^3: perl interpolation
by ikegami (Patriarch) on Jan 24, 2011 at 16:05 UTC
    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?
Re^3: perl interpolation
by cdarke (Prior) on Jan 26, 2011 at 13:20 UTC
    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.