How can I debug a Perl script?

前端 未结 8 1387
天涯浪人
天涯浪人 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

    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)

提交回复
热议问题