in reply to Re^2: Overriding Global Variables
in thread Overriding Global Variables

> clutter of setting and resetting the variable whenever needed.

That's where you use local to change the flag.

The old value will be reset automatically after the dynamic (runtime) scope is left.

edit

FWIW you could additionally have a lexical variable with my which is block scoped and check it using PadWalker

You need to decide which flag takes precedence though, I'd say my over our

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!