Integrate mainline
[p5sagit/p5-mst-13.2.git] / pod / perlop.pod
index 464ba99..8f2ecde 100644 (file)
@@ -645,7 +645,6 @@ any pair of delimiters you choose.
     Customary  Generic        Meaning       Interpolates
        ''       q{}          Literal             no
        ""      qq{}          Literal             yes
-               qu{}          Literal             yes, Unicode
        ``      qx{}          Command             yes (unless '' is delimiter)
                qw{}         Word list            no
        //       m{}       Pattern match          yes (unless '' is delimiter)
@@ -1012,44 +1011,6 @@ Options are:
 See L<perlre> for additional information on valid syntax for STRING, and
 for a detailed look at the semantics of regular expressions.
 
-=item qw/STRING/
-
-Evaluates to a list of the words extracted out of STRING, using embedded
-whitespace as the word delimiters.  It can be understood as being roughly
-equivalent to:
-
-    split(' ', q/STRING/);
-
-the difference being that it generates a real list at compile time.  So
-this expression:
-
-    qw(foo bar baz)
-
-is semantically equivalent to the list:
-
-    'foo', 'bar', 'baz'
-
-Some frequently seen examples:
-
-    use POSIX qw( setlocale localeconv )
-    @EXPORT = qw( foo bar baz );
-
-A common mistake is to try to separate the words with comma or to
-put comments into a multi-line C<qw>-string.  For this reason, the
-C<use warnings> pragma and the B<-w> switch (that is, the C<$^W> variable) 
-produces warnings if the STRING contains the "," or the "#" character.
-
-=item qu/STRING/
-
-Like L<qq> but generates Unicode for characters whose code points are
-greater than 128, or 0x80.  Such characters can be generated using
-the \xHH (for characters 0x80...0xff, or 128..255) and \x{HHH...}
-notations (for characters 0x100..., or greater than 256).
-
-(In qq/STRING/, or "", both the \xHH and the \x{HHH...} generate
-bytes for the 0x80..0xff range (these bytes are host-dependent),
-and the \x{HHH...} can be used to generate Unicode.)
-
 =item qx/STRING/
 
 =item `STRING`
@@ -1131,6 +1092,33 @@ Just understand what you're getting yourself into.
 
 See L<"I/O Operators"> for more discussion.
 
+=item qw/STRING/
+
+Evaluates to a list of the words extracted out of STRING, using embedded
+whitespace as the word delimiters.  It can be understood as being roughly
+equivalent to:
+
+    split(' ', q/STRING/);
+
+the difference being that it generates a real list at compile time.  So
+this expression:
+
+    qw(foo bar baz)
+
+is semantically equivalent to the list:
+
+    'foo', 'bar', 'baz'
+
+Some frequently seen examples:
+
+    use POSIX qw( setlocale localeconv )
+    @EXPORT = qw( foo bar baz );
+
+A common mistake is to try to separate the words with comma or to
+put comments into a multi-line C<qw>-string.  For this reason, the
+C<use warnings> pragma and the B<-w> switch (that is, the C<$^W> variable) 
+produces warnings if the STRING contains the "," or the "#" character.
+
 =item s/PATTERN/REPLACEMENT/egimosx
 
 Searches a string for a pattern, and if found, replaces that pattern
@@ -1574,19 +1562,19 @@ There are several I/O operators you should know about.
 A string enclosed by backticks (grave accents) first undergoes
 double-quote interpolation.  It is then interpreted as an external
 command, and the output of that command is the value of the
-pseudo-literal, j
-string consisting of all output is returned.  In list context, a
-list of values is returned, one per line of output.  (You can set
-C<$/> to use a different line terminator.)  The command is executed
-each time the pseudo-literal is evaluated.  The status value of the
-command is returned in C<$?> (see L<perlvar> for the interpretation
-of C<$?>).  Unlike in B<csh>, no translation is done on the return
-data--newlines remain newlines.  Unlike in any of the shells, single
-quotes do not hide variable names in the command from interpretation.
-To pass a literal dollar-sign through to the shell you need to hide
-it with a backslash.  The generalized form of backticks is C<qx//>.
-(Because backticks always undergo shell expansion as well, see
-L<perlsec> for security concerns.)
+backtick string, like in a shell.  In scalar context, a single string
+consisting of all output is returned.  In list context, a list of
+values is returned, one per line of output.  (You can set C<$/> to use
+a different line terminator.)  The command is executed each time the
+pseudo-literal is evaluated.  The status value of the command is
+returned in C<$?> (see L<perlvar> for the interpretation of C<$?>).
+Unlike in B<csh>, no translation is done on the return data--newlines
+remain newlines.  Unlike in any of the shells, single quotes do not
+hide variable names in the command from interpretation.  To pass a
+literal dollar-sign through to the shell you need to hide it with a
+backslash.  The generalized form of backticks is C<qx//>.  (Because
+backticks always undergo shell expansion as well, see L<perlsec> for
+security concerns.)
 
 In scalar context, evaluating a filehandle in angle brackets yields
 the next line from that file (the newline, if any, included), or
@@ -1601,7 +1589,7 @@ of a C<while> statement (even if disguised as a C<for(;;)> loop),
 the value is automatically assigned to the global variable $_,
 destroying whatever was there previously.  (This may seem like an
 odd thing to you, but you'll use the construct in almost every Perl
-script you write.)  The $_ variables is not implicitly localized.
+script you write.)  The $_ variable is not implicitly localized.
 You'll have to put a C<local $_;> before the loop if you want that
 to happen.