http://qs321.pair.com?node_id=11116512

nysus has asked for the wisdom of the Perl Monks concerning the following question:

This snippet of code will generate a list of symbols for a particular package, called PackageName:

sub dispSymbols { my($hashRef) = shift; my(%symbols); my(@symbols); %symbols = %{$hashRef}; @symbols = sort(keys(%symbols)); foreach (@symbols) { print Dumper printf("%-10.10s| %s\n", $_, $symbols{$_}); } } dispSymbols(\%PackageName::);

But let's say I want to discover all the different packages that I can use inside of the dispSymbols call. How can I generate a list of those top-level packages?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks