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

I wish it were a case of 'how you have things' instead of how the client's ISP has things. Since I always use warnings; until I'm happy with it, I view this as overkill at best. And since it crashes without the '-w' I also view it as a major pain in the posterior. I was hoping that there was some magical reason for this but it doesn't sound like it<sigh>

--hsm

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

Replies are listed 'Best First'.
Re^3: Apache and Perl's -w
by BUU (Prior) on Feb 16, 2005 at 05:36 UTC
    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.
      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."