Ok m0r, I have made a copy of your test script and fixed it so it works. Look at:
http://chatroom.fuckmicrosoft.com:8000/bobhub/cgi-bin/perl_test2.cgiCouple of things. First, you can't edit your Perl scripts on a Win* machine (you sick puppy) and then transfer the scripts to your *NIX machine and have them run without stripping the carriage returns '\r'. More specifically, the first line "#!/usr/bin/perl" can not be terminated with "\r\n", only "\n". DOS/Win terminates lines with a carriage return and a line feed. Unix terminates lines with only a line feed. You can strip them by transferring them to your *NIX box using FTP in "ASCII" mode or once they are on your server you can do this:
tr -d '\r' < script.cgi > newscript.cgi
Secondly, the number of newlines "\n" are key in the header output between the "Content-Type: text/html" and the "<HEAD>" tag. You had:
print "Content-Type: text/html\n\n";
which is good, and then a blank line in front of your "<HTML>" tag. I removed the blank line and it worked.
And of course, the file needs to be readable and executable by the user that Apache runs under.
[ July 25, 2002: Message edited by: VoidMain ]