in reply to How do I generate a list of available top-level packages?

Try this:

dispSymbols(\%::);

Or this:

dispSymbols(\%main::);

They should both do the same thing. Be aware that the main package does have a bunch of random stuff in it.

Replies are listed 'Best First'.
Re^2: How do I generate a list of available top-level packages?
by nysus (Parson) on May 06, 2020 at 20:46 UTC

    Thanks. yeah, I see now I have to manually go through and pull the packages from that hairy hash manually.

    $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

      I have to manually go through and pull the packages from that hairy hash manually.

      You can also use Devel::Symdump:

      use Devel::Symdump; my @packages = Devel::Symdump->rnew->packages;