perlretut: Emphasize difference of /r
authorKarl Williamson <public@khwilliamson.com>
Thu, 31 Mar 2011 16:41:51 +0000 (10:41 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 31 Mar 2011 17:33:21 +0000 (11:33 -0600)
pod/perlretut.pod

index 5625358..d8ac91f 100644 (file)
@@ -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;