develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #119151] perldoc perlre does not appear to mention /r

Thread Previous | Thread Next
Tony Cook via RT
August 6, 2013 05:17
[perl #119151] perldoc perlre does not appear to mention /r
Message ID:
On Mon Aug 05 18:18:01 2013, jkeenan wrote:

> Please review the patch attached.

+=item r
+Non-destructive substitution.  The entity to which the substitution is
+is copied to a plain string.  The substitution is performed on the copy and
+the result of the substitution is returned.  The original entity remains
+unmodified.  See L<perlretut/"Using regular expressions in Perl"> for
+explanation of the C</r> modifier.

As Karl said, it should point at perlop, though the explanation for g
and c also point at perlretut.

I think the description could use work too - right now it talks more
about how the /r flag is implemented rather than what it does.


Non-destructive substitution.  The C<s///> operator will return the
modified string instead of modifying the variable in-place.  See L<<
perlop/sE<sol>PATTERNE<sol>REPLACEMENTE<sol>msixpodualgcer >> for more
details and examples.


via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About