From 7cf040c1f649790a4040aec47e47b4ce8b378728 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Sun, 29 Sep 2013 22:14:55 -0400 Subject: [PATCH] standardize perlre cross-refs to operator-based flags --- pod/perlre.pod | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/pod/perlre.pod b/pod/perlre.pod index ee3244b..cad4366 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -95,15 +95,6 @@ In Perl 5.20 and higher this is ignored. Due to a new copy-on-write mechanism, ${^PREMATCH}, ${^MATCH}, and ${^POSTMATCH} will be available after the match regardless of the modifier. -=item g and c -X X - -Global matching, and keep the Current position after failed matching. -Unlike i, m, s and x, these two flags affect the way the regex is used -rather than the regex itself. See -L for further explanation -of the g and c modifiers. - =item a, d, l and u X X X X @@ -111,14 +102,27 @@ These modifiers, all new in 5.14, affect which character-set semantics (Unicode, etc.) are used, as described below in L. -=item r -X +=item Other Modifiers + +There are a number of flags that can be found at the end of regular +expression constructs that are I generic regular expression flags, but +apply to the operation being performed, like matching or substitution (C +or C respectively). + +Flags described further in +L are: + + c - keep the current position during repeated matching + g - globally match the pattern repeatedly in the string + +Substitution-specific modifiers described in + +L are: -Non-destructive substitution. Unlike regular substitution, the entity to -which the substitution is bound is B modified in place. Rather, the -B of the substitution is returned as a plain string. See -L for further explanation of -the C modifier. + e - evaluate the right-hand side as an expression + ee - evaluate the right side as a string then eval the result + o - pretend to optimize your code, but actually introduce bugs + r - perform non-destructive substitution and return the new value =back -- 2.7.4