Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- PERL 4.0 Reference Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

     q/STRING/

     qq/STRING/

     qx/STRING/

             These are not really functions, but simply syntactic
             sugar  to let you avoid putting too many backslashes
             into quoted strings.  The q operator is  a  general-
             ized single quote, and the qq operator a generalized
             double quote.  The  qx  operator  is  a  generalized
             backquote.   Any  non-alphanumeric  delimiter can be
             used in place of /, including newline.  If the  del-
             imiter  is  an  opening  bracket or parenthesis, the
             final delimiter will be  the  corresponding  closing
             bracket  or  parenthesis.   (Embedded occurrences of
             the  closing  bracket  need  to  be  backslashed  as
             usual.)  Examples:

                  $foo = q!I said, "You said, 'She said it.'"!;
                  $bar = q('This is it.');
                  $today = qx{ date };
                  $_ .= qq
             *** The previous line contains the naughty word "$&".\n
                       if /(ibm|apple|awk)/;      # :-)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson