This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlvar $1 clarification
authorSmylers <Smylers@stripey.com>
Tue, 13 Oct 2009 12:14:46 +0000 (14:14 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Tue, 13 Oct 2009 12:15:24 +0000 (14:15 +0200)
commit8491f48b65f309b745e5fc6441ea3a96237d9b23
treea41ca173fb939faaf20dcea1af38f474b38dc662
parent98fe6610b077571e54be1d655e66e1ad657a8910
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).
pod/perlvar.pod