You can refer to http://perldoc.perl.org/perlvar.html om he future for finding out the symbol names.
In your case the sylbe is called LAST_PAREN_MATCH
%LAST_PAREN_MATCH
%+
Similar to @+ , the %+ hash allows access to the named capture buffers, should they exist, in the last successful match in the currently active dynamic scope.
For example, $+{foo} is equivalent to $1 after the following
The only note I'd make is that the docs includes this:
This variable was added in Perl v5.10.0.
So if you're using an older interpreter this could cause problems.
NOTE as Keith points out int he comment below, you can also use perldoc -v '$+'
. This has the benefit of only working if the symbol is available on your installed version of Perl.
perldoc perlvar
, orperldoc -v '$+'
. Running theperldoc
command has the advantage that it will show you the documentation for the version of Perl you have on your system, not the one that happens to be documented on the web page. – Toluate