This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Improve example code
authorJan Dubois <jand@activestate.com>
Tue, 20 Nov 2007 15:39:50 +0000 (07:39 -0800)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 21 Nov 2007 10:13:04 +0000 (10:13 +0000)
From: "Jan Dubois" <jand@activestate.com>
Message-ID: <076601c82bce$a4fcfe00$eef6fa00$@com>

p4raw-id: //depot/perl@32430

pod/perlsyn.pod

index 177ff4c..8468723 100644 (file)
@@ -607,7 +607,7 @@ is applied recursively to the first argument.
 These rules look complicated, but usually they will do what
 you want. For example you could write:
 
-    when (/^\d$/ && $_ < 75) { ... }
+    when (/^\d+$/ && $_ < 75) { ... }
 
 Another useful shortcut is that, if you use a literal array
 or hash as the argument to C<when>, it is turned into a