In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jdavis) writes: >Hello, > Is it possible to dump the values of all the vars in a perl script >easily? I want to have a sub called Error that when called >will tell me the current value of all the vars in the script.
You can dump out all the variables in package foo by inspecting the hash %foo:: . The library dumpvar.pl in the perl distribution may help here. For lexical variables, you probably want PadWalker; see: http://search.cpan.org/~robin/PadWalker-0.10/PadWalker.pm . Of course, the debugger provides a nice interactive way of doing this. -- Peter Scott http://www.perldebugged.com/ *** NEW *** http//www.perlmedic.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>