Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Printing package information

by fmogavero (Monk)
on Jun 08, 2001 at 21:34 UTC ( [id://86994]=perlquestion: print w/replies, xml ) Need Help??

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::)';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://86994]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found