in reply to Re^2: How to get ($1, $2, ...)?
in thread How to get ($1, $2, ...)?

Oh, or even
# ... push @answers, grep @$_, map [ $line =~ $_], @res; # ...
instead of the for loop over @res.

I realize I'm expanding on a non-solution to the original question. It's art for art's sake, if that's allowed.

Anno