You don't have any captures before your use of $^N, so it's always undef when you use it. Change
(?><+)
to
((?><+))
By the way,
would be better asuse vars qw' $LEN ';
local our $LEN;
In reply to Re: experimental regex (?(?{code}) conditional (??{ 'code' }) )
by ikegami
in thread experimental regex (?(?{code}) conditional (??{ 'code' }) )
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |