If I have a match operator, how do I save the parts of the strings captured in the parentheses in variables instead of using $1, $2, and so on?
$1
$2
The trick is to make m// work in list context by using a list assignment:
($interesting) = $string =~ m/(interesting)/g;
This can be neatly extended to grab more things, eg:
($interesting, $alsogood) = $string =~ m/(interesting) boring (alsogood)/g;