Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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.


Comment on Re^3: local vs my
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2014-08-29 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls