#!/usr/bin/perl -w
use strict;
print("Content-type: text/html\n\n");
print("Hello!");
First question: What do you get when you run it from the command line?
Second question: Did you create this file on the box, or did you upload it from a Windows machine? If the latter, did you sent it as a binary or as a text file? In the case of a text file, line endings are translated appropriately, whereas as a binary file it is sent as-is. An easy way to make sure this isn't the issue is to do the following:
perl -p -i.bak -e "s/\r//g" filename
This will create a backup of the file with the extension .bak, and remove the characters, if it is the case.
Third thought: Add the line $| = 1; after your use strict; line. This will turn off output buffering, and save you headaches later.
Are there any additional clues in the apache error_log?
If the above don't help, then I would suggest you do an ls -l /usr/bin/perl from the command line, which will show you if /usr/bin/perl is actually a symbolic link elsewhere.
Hope that helps....
Later, checking the scripts at /var/www/cgi-bin and other folders, you should figure out what works and what doesn't.
I am also having trouble with MDK 9.2 and Apache 2 + perl. But I yet, don't have much time to get it all fixed and working right...
Check owners and groups also.
perlmonks.org content © perlmonks.org and atcroft, chanio, heroin_bob
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03