Typeglobs are explained in perlmod.
Nested packages (like A::B::C) do not inherit any semantics from their "parents" (A or A::B), only the symbol tables are nested (but if you don't walk symbol tables in your program, you won't notice that). | [reply] [d/l] [select] |
to expand on this, you cannot "nest" packages in the sense of C++ nested classes. At any given point, you only have a single package in which the current "compilation unit" exists. As said above, other than clarity, there is little to no value in the actual nesting, generally done through organizing files in sub-directories with the same name as the parent module, unless you are doing something absurdly complex with symbol tables (Don't).
perlmod would give you a start on globs, but ultimately, the best answer, IMO, is that you shouldn't need to use them for anything until you get a much better knowledge of Perl. While fundamental, they are not a base part of the language, in the way that local variables or functions are.
| [reply] |
use strict;
use warnings;
my @array = ("Hello world");
my $refArray = \@array;
print $refArray->[0];
Prints:
Hello world
Perl's payment curve coincides with its learning curve.
| [reply] [d/l] [select] |
OP is not asking about "->". Less haste in replying can go a long way..
| [reply] |
He used it twice, he should know what its for :)
| [reply] |
Typeglobs are also explained in 'Advanced Perl Programming' book by Sriram Srinivasan, I personally love this book. | [reply] |
Do you see the message that appears at the very top of this node? It says:
perlpal has asked for the WISDOM of the Perl Monks concerning the following QUESTION:
It does not say:
perlpal has asked for the FAITH of the Perl Monks concerning the following DOUBT
You have been corrected time and time again on this. You really look like a troll considering how well written the rest of your English is. | [reply] |