I am looking for best, easiest way to do something like:
$var1='value'; bunch of code..... **print allVariablesAndTheirValuesCurrentlyDefined;**
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Package variables? Lexical variables?
Package variables can be looked up via the symbol table. Try Devel::Symdump:
Lexical variables are a little tricker, you won’t find them in the symbol table. They can be looked up via the ‘scratchpad’ that belongs to the block of code they’re defined in. Try PadWalker: