Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: local vs my

by Aristotle (Chancellor)
on Sep 02, 2002 at 20:30 UTC ( #194631=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194631]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2018-01-20 15:54 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.