Problems with perl

I am trying to learn perl. I have gone to the wiki and did the chmod -R perldir (where perldir is the dir the perl script is in) as they said to do but for some reason it still get a 500 error im just doing a simple script that i got off a tutorial to make sure perl worked which is:
print “Content-type: text/html\n\n”;
print “”;
print “CGI Test”;
print “”;
print “

I just wrote a web page using Perl!

print “”;
If you know why it is not working could you please help me.

Both the script file and the directory in which it resides must be chmod 755 (or at least executable but not writable).

In addition you’ll need to learn how to develop debugging code for CGI scripts. A quick and easy way is to include:

use CGI::Carp qw(fatalsToBrowser);

So that most errors like parsing errors will be displayed in a web page instead of getting the generic 500 message. Just remember to take it out for production code.

:cool: [color=#6600CC]Atropos[/color] |

Thanks for the help but it still doesn’t seem to work it have tried changing the file extension from .pl to .cgi and doing that again. i have tried changing directorys have tried rewritting it and doing that again.and even when i include your script i still just get the 500 error.
Nothing seems to work, any other advice that might help?

Are you uploading your scripts as ascii format? If you send it as a binary, that can cause it to fail.

Also if you’ve been messing about the filename and extensions, you may well need to chmod 755 the file again. The directories don’t normally need their permissions touched.

thank you so much. it was because i was uploading in binary.
Now i can actually start learning perl.