develooper Front page | perl.perl5.porters | Postings from April 2003

[PATCH] [perl #18341] random nits in perlrequick.pod

Thread Next
From:
Casey West
Date:
April 29, 2003 13:09
Subject:
[PATCH] [perl #18341] random nits in perlrequick.pod
Message ID:
20030429201420.GT62281@geeknest.com
http://rt.perl.org/rt2/Ticket/Display.html?Status=open&id=18341

This requestor had a lot of useful comments (some not useful).
Picking and choosing very carefully, I have cleaned up necessarily in
the following patch.

  Casey West

-- 
"Our wines leave you nothing to hope for."
 --On the Menu of a Swiss Restaurant

--- perl-current.orig/pod/perlrequick.pod       Fri Nov 16 08:18:35 2001
+++ perl-current/pod/perlrequick.pod    Tue Apr 29 16:05:20 2003
@@ -74,7 +74,7 @@
     "2+2=4" =~ /2+2/;    # doesn't match, + is a metacharacter
     "2+2=4" =~ /2\+2/;   # matches, \+ is treated like an ordinary +
     'C:\WIN32' =~ /C:\\WIN/;                       # matches
-    "/usr/bin/perl" =~ /\/usr\/local\/bin\/perl/;  # matches
+    "/usr/bin/perl" =~ /\/usr\/bin\/perl/;  # matches
 
 In the last regex, the forward slash C<'/'> is also backslashed,
 because it is used to delimit the regex.
@@ -167,27 +167,39 @@
 
 =item *
 
-\d is a digit and represents [0-9]
+\d is a digit and represents
+
+    [0-9]
 
 =item *
 
-\s is a whitespace character and represents [\ \t\r\n\f]
+\s is a whitespace character and represents
+
+    [\ \t\r\n\f]
 
 =item *
 
-\w is a word character (alphanumeric or _) and represents [0-9a-zA-Z_]
+\w is a word character (alphanumeric or _) and represents
+
+    [0-9a-zA-Z_]
 
 =item *
 
-\D is a negated \d; it represents any character but a digit [^0-9]
+\D is a negated \d; it represents any character but a digit
+
+    [^0-9]
 
 =item *
 
-\S is a negated \s; it represents any non-whitespace character [^\s]
+\S is a negated \s; it represents any non-whitespace character
+
+    [^\s]
 
 =item *
 
-\W is a negated \w; it represents any non-word character [^\w]
+\W is a negated \w; it represents any non-word character
+
+    [^\w]
 
 =item *
 
@@ -239,7 +251,7 @@
 
 At a given character position, the first alternative that allows the
 regex match to succeed will be the one that matches. Here, all the
-alternatives match at the first string position, so th first matches.
+alternatives match at the first string position, so the first matches.
 
 =head2 Grouping things and hierarchical matching
 
@@ -464,7 +476,7 @@
                                 # $const[2] = '3.142'
 
 If the empty regex C<//> is used, the string is split into individual
-characters.  If the regex has groupings, then list produced contains
+characters.  If the regex has groupings, then the list produced contains
 the matched substrings from the groupings as well:
 
     $x = "/usr/bin";

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About