That's where you use local to change the flag.
The old value will be reset automatically after the dynamic (runtime) scope is left.
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!
In reply to Re^3: Overriding Global Variables
by LanX
in thread Overriding Global Variables
by Mano_Man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |