in reply to Double Capturing Parentheses

I didn't understand either, and I'm lazy so:
use YAPE::Regex::Explain; my $regex=YAPE::Regex::Explain->new(qr/((.))/); print $regex->explain; __END__ The regular expression: (?-imsx:((.))) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- ( group and capture to \2: ---------------------------------------------------------------------- . any character except \n ---------------------------------------------------------------------- ) end of \2 ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
so your foreach makes this is evaluated in list-context and \1 and \2 are passed.