$foo = 1; use strict; { our $foo; $foo++; # $::foo now 2 } { no strict; $foo++; # $::foo now 3 } # dies with # Global symbol "$foo" requires explicit package name $foo++;
Dave.
In reply to Re: 'our' scoping
by dave_the_m
in thread 'our' scoping
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |