Perl and 500 internal server errors


Hello Listers,

I am trying to get Perl working on my website and am running into 500 internal server error. I have a simple “hello world” script uploaded into a directory and have set the permissions to 755. I wrote the script in windows notepad and have heard about problems with Perl and linefeeds - don’t know if that is a problem with notepad.

I am including the script below (forgive me;-). I am hoping it is something siimple and I can be put straight right away. thank you for any help getting Perl up and running on my website.

script follows…
#! /usr/bin/perl

print “Content-type:text/html\n\n”;

print “My First Script\n\n”;
print “\n”;
print “

Hello world!

print “”;


Linefeeds in files created by Notepad are most certainly a problem, and they can render your script inoperative.

That, and permissions (the directory the script is in, as well as the scripts itself, should be set to 755). If your script was prepared in notepad, you can convert the line endings using the dos2unix command from the command line. Do this, and try again, and it may fix your problem.

–DreamHost Tech Support