[quote]pl of course, and yes it is executable (otherwise I wouldn’t be able to execute it under ssh either). [/quote
That depends on whether your command is ‘perl filename.pl’ or simply ‘./filename.pl’; in the first case, perl is reading the script file as a data file, and execute permission is not necessary. In the latter, the OS ‘executes’ the file by looking for the magic number and passing the file path to the command following it.
Actually not weird at all. You forget that you are still executing PHP in a CGI environment, so it think it is supposed to generate a web page parsing something. The CGI environment will say the SCRIPT_FILENAME or some other variable will be ‘perl-script-filename’ and thus PHP will read that file and parse it.
Perl / MySQL / HTML+CSS