in reply to
Localized Backreferences, If Statements & Blocks
Here is a good discussion of this phenomenon:
Scope of RegEx Vars
Comment on
Re: Localized Backreferences
In Section
Seekers of Perl Wisdom