Perl v5.26 adds three new special variables related to captures. The @{^CAPTURE}
is an array of all the capture buffers. %{^CAPTURE}
is a alias for %+
and stores the actually-matched named capture labels as its keys. %{^CAPTURE_ALL}
is an alias for %-
and stores all the named capture labels and their matched (or not) values.
Continue reading “Use @{^CAPTURE} to get a list of all the capture buffers”