summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
authorSmylers <Smylers@stripey.com>2009-10-13 14:14:46 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2009-10-13 14:15:24 +0200
commit8491f48b65f309b745e5fc6441ea3a96237d9b23 (patch)
treea41ca173fb939faaf20dcea1af38f474b38dc662 /pod/perlvar.pod
parent98fe6610b077571e54be1d655e66e1ad657a8910 (diff)
downloadperl-8491f48b65f309b745e5fc6441ea3a96237d9b23.tar.gz
perlvar $1 clarification
$1 is currently documented as being set by the "last pattern match". But it is left alone by unsuccessful pattern match attempts (continuing to hold a value from an earlier successful match). Saying "last successful pattern match" clarifies this; it's also the phrase used to document $&. Second, the entry for $1 in perlvar doesn't actually contain the text "$1" anywhere. As such, doing man perlvar then using /\$1 to search for it in less doesn't locate it (though does match other places in that file where $1 happens to be used).
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 7c61a05096..f2e29e1e2e 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -214,11 +214,11 @@ able to use them in the sort() comparison block or function.
=over 8
-=item $<I<digits>>
+=item $<I<digits>> ($1, $2, ...)
X<$1> X<$2> X<$3>
Contains the subpattern from the corresponding set of capturing
-parentheses from the last pattern match, not counting patterns
+parentheses from the last successful pattern match, not counting patterns
matched in nested blocks that have been exited already. (Mnemonic:
like \digits.) These variables are all read-only and dynamically
scoped to the current BLOCK.