No. package only declares a new package, it does not end the lexical scope of the previous package. The $var you use after the package main statement is the lexical $var that you declared after the package two; statement.
In reply to Re: Is this a bug in Perl scope?
by Corion
in thread Is this a bug in Perl scope?
by Zarabozo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |