Another way to illustrate it would be:
use 5.010; { package Foo; say __PACKAGE__; } say __PACKAGE__;
If your Perl is recent enough, you can even do this:
use 5.014; package Foo { say __PACKAGE__; } say __PACKAGE__;
In reply to Re^2: Package declaration in code block
by tobyink
in thread Package declaration in code block
by McA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |