- or download this
use strict;
...
# The lexical (second) one still wins.
print $bar; # works, prints $foo::bar even though we are in baz
- or download this
use strict;
...
package baz;
# $bar has only one meaning, access $baz::bar
print $bar; #error
- or download this
package foo;
print $bar; # prints the global $foo::bar
package baz;
print $bar; # prints the global $baz::bar