Hi,
have a look at perldoc -f local. I'm not sure whether you want the following:
use Data::Dumper; $Data::Dumper::blah = 0; # Set defaults $Data::Dumper::fred = 'xyz'; ... if ($i_am_debugging_this_bit) { local $Data::Dumper::blah = 1; # Override these for a bit local $Data::Dumper::fred = 'nerd'; ... }
This should do what you want.
Regards
McA
In reply to Re: Can I auto-save and restore global variables?
by McA
in thread Can I auto-save and restore global variables?
by davehorsfall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |