This is handy for some of perl's cruftier globals such as $/ and $".$foo = "main scope"; { local $foo = "temp scope"; print "\$foo is $foo\n"; } print "\$foo now $foo\n"; __output__ $foo is temp scope $foo now main scope
broquaint
In reply to Re: Is local a declaration?
by broquaint
in thread Is local a declaration?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |