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

How can I print out all of the main:: keys and values.

print @main::INC will print the items in that array.

How can I print all of the other stuff in the main package?

Edit: chipmunk 2001-06-08

Replies are listed 'Best First'.
Re: Pinting package information
by mirod (Canon) on Jun 08, 2001 at 21:44 UTC

    I would trust Data::Dumper for this:

    perl -MData::Dumper -e 'print Dumper %main::';

    or, for extra XML points (and ease of reprocessing the data):

    perl -MData::DumpXML -e 'print Data::DumpXML::dump_xml( %main::)';