perlfunc.pod grammar fixes
[p5sagit/p5-mst-13.2.git] / pod / perlre.pod
index f0d7645..39110ff 100644 (file)
@@ -223,12 +223,12 @@ equivalents (if available) are as follows:
 
 =item [1]
 
-A GNU extension equivalent to C<[ \t]>, `all horizontal whitespace'.
+A GNU extension equivalent to C<[ \t]>, "all horizontal whitespace".
 
 =item [2]
 
 Not exactly equivalent to C<\s> since the C<[[:space:]]> includes
-also the (very rare) `vertical tabulator', "\ck", chr(11).
+also the (very rare) "vertical tabulator", "\ck", chr(11).
 
 =item [3]
 
@@ -252,7 +252,7 @@ backslash character classes (if available), will hold:
     alpha       IsAlpha
     alnum       IsAlnum
     ascii       IsASCII
-    blank      IsSpace
+    blank       IsSpace
     cntrl       IsCntrl
     digit       IsDigit        \d
     graph       IsGraph
@@ -269,7 +269,7 @@ For example C<[:lower:]> and C<\p{IsLower}> are equivalent.
 
 If the C<utf8> pragma is not used but the C<locale> pragma is, the
 classes correlate with the usual isalpha(3) interface (except for
-`word' and `blank').
+"word" and "blank").
 
 The assumedly non-obviously named classes are:
 
@@ -400,7 +400,7 @@ until the end of the enclosing block or until the next successful
 match, whichever comes first.  (See L<perlsyn/"Compound Statements">.)
 
 B<NOTE>: failed matches in Perl do not reset the match variables,
-which makes easier to write code that tests for a series of more
+which makes it easier to write code that tests for a series of more
 specific cases and remembers the best match.
 
 B<WARNING>: Once Perl sees that you need one of C<$&>, C<$`>, or
@@ -1265,7 +1265,7 @@ Overloaded constants (see L<overload>) provide a simple way to extend
 the functionality of the RE engine.
 
 Suppose that we want to enable a new RE escape-sequence C<\Y|> which
-matches at boundary between white-space characters and non-whitespace
+matches at boundary between whitespace characters and non-whitespace
 characters.  Note that C<(?=\S)(?<!\S)|(?!\S)(?<=\S)> matches exactly
 at these positions, so we want to have each C<\Y|> in the place of the
 more complicated version.  We can create a module C<customre> to do
@@ -1282,6 +1282,8 @@ this:
 
     sub invalid { die "/$_[0]/: invalid escape '\\$_[1]'"}
 
+    # We must also take care of not escaping the legitimate \\Y|
+    # sequence, hence the presence of '\\' in the conversion rules.
     my %rules = ( '\\' => '\\\\', 
                  'Y|' => qr/(?=\S)(?<!\S)|(?!\S)(?<=\S)/ );
     sub convert {