in reply to Re^2: Apache and Perl's -w
in thread Apache and Perl's -w

Using my incredible magic powers, I shall guess that you are uploading a perl script with line endings in windows format, to a linux type machine, and not converting the line endings. Thus your shebang actually looks like #!/usr/bin/perl^M and perl^M doesn't exist on the machine so it doesn't run. This of course has nothing to do with apache or perl, but when you add -w infront of the ^M, the kernel can find the appropiate interpreter and perl ignores the ^M.

Replies are listed 'Best First'.
Re^4: Apache and Perl's -w
by hsmyers (Canon) on Feb 16, 2005 at 15:44 UTC
    Insert sound of my hand forcefully hitting my forehead here. Yes!! Thank you, I feel better now---the slap helped, but the explanation helped even more.

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."