This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlop.pod: Fix typo that yields wrong info
[perl5.git] / pod / perlop.pod
index 0398f70..7db132c 100644 (file)
@@ -561,7 +561,7 @@ the table is sorted on the right operand instead of on the left.
                 like: exists HASH->{Any}
 
  Right operand is CODE:
-   
+
  Left      Right      Description and pseudocode                               
  ===============================================================
  ARRAY     CODE       sub returns true on all ARRAY elements[1]
@@ -1408,7 +1408,7 @@ table:
    \c?      chr(127)
 
 In other words, it's the character whose code point has had 64 xor'd with
-its uppercase.  C<\c?> is DELETE because C<ord("@") ^ 64> is 127, and
+its uppercase.  C<\c?> is DELETE because C<ord("?") ^ 64> is 127, and
 C<\c@> is NULL because the ord of "@" is 64, so xor'ing 64 itself produces 0.
 
 Also, C<\c\I<X>> yields C< chr(28) . "I<X>"> for any I<X>, but cannot come at the
@@ -1659,10 +1659,10 @@ Options (specified by the following modifiers) are:
     o  Compile pattern only once.
     a   ASCII-restrict: Use ASCII for \d, \s, \w; specifying two
         a's further restricts /i matching so that no ASCII
-        character will match a non-ASCII one
-    l   Use the locale
-    u   Use Unicode rules
-    d   Use Unicode or native charset, as in 5.12 and earlier
+        character will match a non-ASCII one.
+    l   Use the locale.
+    u   Use Unicode rules.
+    d   Use Unicode or native charset, as in 5.12 and earlier.
 
 If a precompiled pattern is embedded in a larger pattern then the effect
 of "msixpluad" will be propagated appropriately.  The effect the "o"
@@ -2139,7 +2139,7 @@ X<qx> X<`> X<``> X<backtick>
 =item `STRING`
 
 A string which is (possibly) interpolated and then executed as a
-system command with C</bin/sh> or its equivalent.  Shell wildcards,
+system command with F</bin/sh> or its equivalent.  Shell wildcards,
 pipes, and redirections will be honored.  The collected standard
 output of the command is returned; standard error is unaffected.  In
 scalar context, it comes back as a single (potentially multi-line)
@@ -2474,21 +2474,25 @@ you'll need to remove leading whitespace from each line manually:
     FINIS
 
 If you use a here-doc within a delimited construct, such as in C<s///eg>,
-the quoted material must come on the lines following the final delimiter.
-So instead of
+the quoted material must still come on the line following the
+C<<< <<FOO >>> marker, which means it may be inside the delimited
+construct:
 
     s/this/<<E . 'that'
     the other
     E
      . 'more '/eg;
 
-you have to write
+It works this way as of Perl 5.18.  Historically, it was inconsistent, and
+you would have to write
 
     s/this/<<E . 'that'
      . 'more '/eg;
     the other
     E
 
+outside of string evals.
+
 Additionally, quoting rules for the end-of-string identifier are
 unrelated to Perl's quoting rules. C<q()>, C<qq()>, and the like are not
 supported in place of C<''> and C<"">, and the only interpolation is for
@@ -2650,7 +2654,7 @@ expansions.
 
 Let it be stressed that I<whatever falls between C<\Q> and C<\E>>
 is interpolated in the usual way.  Something like C<"\Q\\E"> has
-no C<\E> inside.  instead, it has C<\Q>, C<\\>, and C<E>, so the
+no C<\E> inside.  Instead, it has C<\Q>, C<\\>, and C<E>, so the
 result is the same as for C<"\\\\E">.  As a general rule, backslashes
 between C<\Q> and C<\E> may lead to counterintuitive results.  So,
 C<"\Q\t\E"> is converted to C<quotemeta("\t")>, which is the same