X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlre.pod;h=ea88fc08b5d9b7fd82006f95fd36d38a6471b130;hb=12fc24939aa1955e247b87a4837866062d192a17;hp=365cbb9aaaf213ad83289e7bc4ea00d55745e2c5;hpb=665e98b9987fe678dd115b56e9f0c9eb6bba0f1e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlre.pod b/pod/perlre.pod index 365cbb9..ea88fc0 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -574,6 +574,10 @@ track of the number of nested parentheses. For example: /the (\S+)(?{ $color = $^N }) (\S+)(?{ $animal = $^N })/i; print "color = $color, animal = $animal\n"; +Inside the C<(?{...})> block, C<$_> refers to the string the regular +expression is matching against. You can also use C to know what is +the current position of matching withing this string. + The C is properly scoped in the following sense: If the assertion is backtracked (compare L<"Backtracking">), all changes introduced after Cization are undone, so that