in reply to Dealing with incorrect shebang line entries on Windows with Apache

perlrun recommends

#!/usr/bin/env perl
which may work for you in this case.

Update Added emphasis to the word "may" in response to merlyn's comment. :-)

the lowliest monk

  • Comment on Re: Dealing with incorrect shebang line entries on Windows with Apache
  • Download Code

Replies are listed 'Best First'.
Re^2: Dealing with incorrect shebang line entries on Windows with Apache
by merlyn (Sage) on May 04, 2005 at 16:07 UTC
    That's actually a dangerous practice, if you have multiple installs of Perl. Your PATH may not match my PATH, so we'll end up picking different Perl versions to run.

    Also, env may not be on your box, and worse, I've seen machines where it's /bin/env instead of /usr/bin/env. Ooops!

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      Good point. Being the main 'Perl guy' here at work, I have three installs of Perl. A couple others have two installs and the rest have just one install.