Can't get perl CGI to execute

I’ve tried many things, but I still get a 500.

#!/usr/bin/perl -w
use diagnostics;
use strict;
use CGI;

#comment this out later
print “Content-type: text/html\n\n”;
use CGI::Carp(‘fatalsToBrowser’);

print <<endofhtml ;

title Hello, world! endofhtml


I’ve chmod 755’d the directory and the file. I’ve verified the perl location. perl -c file.cgi says it executes correctly, as does ./file.cgi. I’ve chowner username file.cgi’d. The file is on a cgi-enabled hosted domain. The worst thing is I had it working for a couple of minutes, seemingly randomly, then I chmod 755 *'d in the directory and I started getting 500’s again. Any suggestions?

Wow, I could have sworn I chmodded the directory at least five different times, but that seemed to do the trick. Thanks for making me try it again. :slight_smile: