in reply to Module variables

The following source from Mastering Perl

Each package has a special hash-like data structure called the symbol table, which comprises all of the typeglobs for that package. It's not a real Perl hash, but it acts like it in some ways, and its name is the package name with two colons on the end.
This isn't a normal Perl hash, but it can accessed with the keys operator. Want to see all of the symbol names defined in the main package? simply print all the keys for this special hash:

#!/usr/bin/perl foreach my $entry ( keys %main:: ) { print "$entry\n"; }