Perl 500 Error Questions - Not permission Settings

When executing in a browser, it does not work. I have all permission 755 defined. Syntax check in shell. I have a test.cgi script below:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello World\n";

-----------

Getting a Internal Server Error when execute

-----------

Checking error reads:

(2)No such file or directory: exec of /home/admin/public_html/cgi-bin/test.cgi failed

Premature end of script headers: /home/admin/public_html/cgi-bin/test.cgi

PROBLEM:





I noticed if I add "-w" at the end of "#!/usr/bin/perl", it will work. The question is in the other dedicated server, I do not need to add -w. How can I get it to work with out the "-w"? Any suggestions?

Thank you.

 

 

 

 

Top