projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
289f3bf
)
perlretut: Emphasize difference of /r
author
Karl Williamson
<public@khwilliamson.com>
Thu, 31 Mar 2011 16:41:51 +0000
(10:41 -0600)
committer
Karl Williamson
<public@khwilliamson.com>
Thu, 31 Mar 2011 17:33:21 +0000
(11:33 -0600)
pod/perlretut.pod
patch
|
blob
|
history
diff --git
a/pod/perlretut.pod
b/pod/perlretut.pod
index
5625358
..
d8ac91f
100644
(file)
--- a/
pod/perlretut.pod
+++ b/
pod/perlretut.pod
@@
-1726,7
+1726,8
@@
C<print> and the C<s/$regexp/$replacement/go> use C<$_> implicitly.
If you don't want C<s///> to change your original variable you can use
the non-destructive substitute modifier, C<s///r>. This changes the
-behavior so that C<s///r> returns the final substituted string:
+behavior so that C<s///r> returns the final substituted string
+(instead of the number of substitutions):
$x = "I like dogs.";
$y = $x =~ s/dogs/cats/r;