This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document non-destructive substitution: the '/r' modifier.
authorJames E Keenan <jkeenan@cpan.org>
Tue, 6 Aug 2013 01:12:55 +0000 (21:12 -0400)
committerJames E Keenan <jkeenan@cpan.org>
Thu, 8 Aug 2013 01:04:40 +0000 (21:04 -0400)
Per bug report filed by Jacinta Richardson++.

For: RT #119151

pod/perlre.pod

index 3b3f727..404fc31 100644 (file)
@@ -111,6 +111,15 @@ These modifiers, all new in 5.14, affect which character-set semantics
 (Unicode, etc.) are used, as described below in
 L</Character set modifiers>.
 
+=item r
+X</r>
+
+Non-destructive substitution.  Unlike regular substitution, the entity to
+which the substitution is bound is B<not> modified in place.  Rather, the
+B<result> of the substitution is returned as a plain string.  See
+L<perlop/"s/PATTERN/REPLACEMENT/msixpodualgcer"> for further explanation of
+the C</r> modifier.
+
 =back
 
 Regular expression modifiers are usually written in documentation