in reply to Dumping symbol table shows variables declared with our but not my
The variables you declared with my are lexically scoped variables.
They do not live in the package main, hence you cannot see them there;
That is what lexicals and the my-keyword are all about.
See Variable scoping in perldoc perlintro for a first glance
and Private Variables via my() in perldoc perlsub for better explanation of my.
Edit: added links to perlsub which has better documentation. And the following:
perldoc -f our says that the variable is part of the package.
Cheers, Sören
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dumping symbol table shows variables declared with our but not my
by Popcorn Dave (Abbot) on Oct 11, 2004 at 02:36 UTC | |
by revdiablo (Prior) on Oct 11, 2004 at 16:46 UTC |