summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-10-06 21:16:01 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-07 14:30:32 +0000
commit81714fb9c03d91d66b66cab6e899e81bf64a2ca7 (patch)
tree40861dec0355f417fff2a7ff3c393082960066cc /pod/perlvar.pod
parentf5def3a2a0d8913110936f9f4e13e37835754c28 (diff)
downloadperl-81714fb9c03d91d66b66cab6e899e81bf64a2ca7.tar.gz
Re: [PATCH] Initial attempt at named captures for perls regexp engine
Message-ID: <9b18b3110610061016x5ddce965u30d9a821f632d450@mail.gmail.com> p4raw-id: //depot/perl@28957
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod13
1 files changed, 12 insertions, 1 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 4d8c17e84e..8a486b2b74 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -313,6 +313,17 @@ past where $2 ends, and so on. You can use C<$#+> to determine
how many subgroups were in the last successful match. See the
examples given for the C<@-> variable.
+=item %+
+X<%+>
+
+Similar to C<@+>, the C<%+> hash allows access to the named capture
+buffers, should they exist, in the last successful match in the
+currently active dynamic scope.
+
+C<$+{foo}> is equivalent to C<$1> after the following match:
+
+ 'foo'=~/(?<foo>foo)/;
+
=item HANDLE->input_line_number(EXPR)
=item $INPUT_LINE_NUMBER
@@ -322,7 +333,7 @@ examples given for the C<@-> variable.
=item $.
X<$.> X<$NR> X<$INPUT_LINE_NUMBER> X<line number>
-Current line number for the last filehandle accessed.
+Current line number for the last filehandle accessed.
Each filehandle in Perl counts the number of lines that have been read
from it. (Depending on the value of C<$/>, Perl's idea of what