Quote and Quote-like Operators ------------------------------While we usually think of quotes as literal values, in Perl theyfunction as operators, providing various kinds of interpolating and pattern matching capabilities. Perl provides customary quote characters for these behaviors, but also provides a way for you to choose your quote character for any of them. In the following table, a {} represents any pair of delimiters you choose.
    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 ''.
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment