in reply to Re^3: Regex capture consumed by non-capturing match
in thread Regex capture consumed by non-capturing match

Not so.

if (my @matches = $string =~ /re/) { my ($a, $b, $c) = trim_func(@matches); }