I was scratching my head for a while because of this. Basically, subpatterns defined inside a DEFINE block count towards the total number of captures in a regex, so perl -E '@etc = "a" =~ /(.)(?(DEFINE)(?<example>1))/; say scalar @etc' will output 2, not 1. Admittedly this is covered in perlre already, but for named captures in general; For whatever reason I thought stuff inside DEFINEs would be different.Thread Next