in reply to Understanding difference between my and local variables.
One point-of-confusion that might help to be cleared up is ... just how Perl uses the concept of namespaces. The package statement introduces a new namespace, but a single file can have as many package statements within it as you wish. (It may not be a nifty practice, but it can be done.) There is a default namespace that is assumed to exist if no other namespace has been put into effect.
Therefore, everything that you declare is always associated with some namespace. There is no “global universe outside all the spheres,” at least, not as far as I know. (But I am a simple monk, not inducted into the Deeper Mysteries.)
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Understanding difference between my and local variables.
by manishrathi (Beadle) on Oct 15, 2010 at 19:53 UTC |