How can I debug a Perl script?

前端 未结 8 1385
天涯浪人
天涯浪人 2021-02-01 16:47

When I run a Perl script, how can I debug it? For example, in ksh I add the -x flag. But how I do the same in Perl?

相关标签:
8条回答
  • 2021-02-01 17:18

    I would also recommend using the Perl debugger.

    However, since you asked about something like shell's -x have a look at the Devel::Trace module which does something similar.

    0 讨论(0)
  • 2021-02-01 17:18

    The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.

    Brian Kernighan, "Unix for Beginners" (1979)

    (And enhancing print statements with Data::Dumper)

    0 讨论(0)
提交回复
热议问题