in reply to Find out which subpattern matched in regex
You can use "given/when" constructs to match against a regex array from 5.10 on
given ($_) { when (@reglist) { # you have a match } default { # you don't have a match } } [download]