in reply to $1 empty with (?(DEFINE)) and (?&NAME)

The reason this is happening is that in Perl (well, v5), named groups still participate in being numbered groups. So if you put the DEFINE first, you get the byte group counting as $1.

I don’t usually try mixing numbered and named group together, because as you see, the numbered ones are fragile.

  • Comment on Re: $1 empty with (?(DEFINE)) and (?&NAME)