in reply to Re: A regex BR variable dead in following line/command
in thread A regex BR variable dead in following line/command

See Coping with Scoping.

Although that explains local, it unfortunately doesn't explain what's going on in the OP's example (that $1 and friends are dynamically scoped).

Replies are listed 'Best First'.
Re^3: A regex BR variable dead in following line/command
by hippo (Archbishop) on Nov 12, 2021 at 16:22 UTC

    Indeed so. It was meant more as a suggested answer to abdan's second question rather than their first.


    🦛