I was wondering if there was an operator name for %+
, so instead of code like:
/(?<CaptureName>\w+)/;
...
my $whatever=$+{CaptureName};
I could use something more readable:
use English;
/(?<CaptureName>\w+)/;
...
my $whatever=$?????{CaptureName};
Using the English module you can refer to it as %LAST_PAREN_MATCH
:
use English;
/(?<CaptureName>\w+)/;
...
my $whatever = $LAST_PAREN_MATCH{CaptureName};