in reply to Strange behavior of @- and @+ in perl5.10 regexps

Or may be both must have length 6?.

Since it looks as it starts working by successively substituting the right hand sides of the definitions the former main regexp

^((?&expr))((?&expr))\z
is translated to:

((.)(.))((.)(.))
which has 6 parenthesis

Replies are listed 'Best First'.
Re^2: Strange behavior of @- and @+ in perl5.10 regexps
by JavaFan (Canon) on Sep 11, 2009 at 10:50 UTC
    A matching regexp with 6 sets of capturing parenthesis leads to @- having seven elements.