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

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

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
August 6, 2013 05:17
Subject:
[perl #119151] perldoc perlre does not appear to mention /r
Message ID:
rt-3.6.HEAD-2552-1375766250-973.119151-15-0@perl.org
On Mon Aug 05 18:18:01 2013, jkeenan wrote:

> Please review the patch attached.

+=item r
+X</r>
+
+Non-destructive substitution.  The entity to which the substitution is
bound
+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
further
+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.

Maybe:

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.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119151

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About