How can I troubleshoot my Perl CGI script?

前端 未结 8 1089
深忆病人
深忆病人 2020-11-22 02:43

I have a Perl script that isn\'t working and I don\'t know how to start narrowing down the problem. What can I do?


Note: I\'m adding the question because I rea

8条回答
  •  盖世英雄少女心
    2020-11-22 02:54

    It will probably also be worth mentioning that Perl will always tell you on what line the error occurs when you execute the Perl script from the command line. (An SSH Session for example)

    I will usually do this if all else fails. I will SSH into the server and manually execute the Perl script. For example:

    % perl myscript.cgi 
    

    If there is a problem then Perl will tell you about it. This debugging method does away with any file permission related issues or web browser or web server issues.

提交回复
热议问题