in reply to Re: 'our' scoping
in thread 'our' scoping
Note that our caused you to access $bar::foo even when you'd have otherwise expected to access $foo::foo.package foo; our $foo = "I'm in foo"; package bar; our $foo = "I'm in bar"; package foo; print "1) $foo\n2) $foo::foo\n3) $bar::foo\n";
For giggles and grins, mix our with $_ when you aren't in package main. Tons of confusion!
|
|---|