What’s the best way to discover all variables a Perl application has currently defined?

前端 未结 5 1886
太阳男子
太阳男子 2020-12-30 11:01

I am looking for best, easiest way to do something like:

$var1=\"value\";
bunch of code.....
**print allVariablesAndTheirValuesCurrentlyDefined;**

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 11:28

    Would this be for anything other than debugging purposes? If not, you may want to familiarize yourself with perl's debugger. Once inside the debugger you can inspect all variables by issuing 'V'.

提交回复
热议问题