2.10. Typeglobs and Filehandles

Perl uses an special type called a typeglob to hold an entire symbol
table entry. (The symbol table entry *foo contains the values of
$foo, @foo, %foo, &foo, and several
interpretations of plain old foo.) The type prefix of a typeglob is
a * because it represents all types.

One use of typeglobs (or references thereto) is for passing or
storing filehandles. If you want to save away a filehandle, do it
this way:

The main use of typeglobs nowadays is to alias one symbol table
entry to another symbol table entry. Think of an alias as a
nickname. If you say:

*foo = *bar;

it makes everything named "foo" a synonym for every corresponding
thing named "bar". You can alias just one variable from a
typeglob by assigning a reference instead:

*foo = \$bar;

makes $foo an alias for $bar,
but doesn't make @foo an alias for
@bar, or %foo an alias for
%bar. All these affect global (package) variables
only; lexicals cannot be accessed through symbol table entries.
Aliasing global variables like this may seem like a silly thing to
want to do, but it turns out that the entire module export/import
mechanism is built around this feature, since there's nothing that
says the symbol you're aliasing has to be in your namespace. This: