Is there a way to turn on tracing in perl (equivalent to bash -x)?

前端 未结 4 1427
滥情空心
滥情空心 2020-12-30 18:54

I have a system script in perl. I need some equivalent of bash -x to determine what is going wrong with the script. Is there something equivalent?

EDIT: What bash -x

4条回答
  •  礼貌的吻别
    2020-12-30 19:39

    Always include these statements in your perl scripts:

    use strict;
    use warnings;
    

    If you want to debug it, use the -d switch. And here are the commands: http://www.domainavenue.com/pl-debug.htm

    Hope that helps.

提交回复
热议问题