http://www.perlmonks.org?node_id=194631


in reply to Re^2: local vs my
in thread local vs my

There's quite a difference between a true global variable (as defined with use vars or our or my at file scope), and something like $Package::variable (which is also global in the sense that it's accessible from outside of the package that defined it).
That's not true. Do not confuse file scoped lexicals variables such as my and our can declare with package scoped globals ones which is what the vars pragma declares, which are exactly $Package::variables.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^3: local vs my
by Anonymous Monk on Sep 03, 2002 at 03:04 UTC
    Do not confuse file scoped lexicals such as my and our can declare with package scoped globals

    And do not confuse variables declared with our as anything other than the same package globals as those declared with 'use vars' or accessed by full package name. The only difference is in the scope of the unqualified access! In particular, our does not involve lexical variables at all.