in reply to shebang line for Perl scripts under Apache/Windows

If the perl executable is in the PATH environment variable on both operating systems (most probably it is if you are using ActivePerl on windows) then you can only use
#!perl
it should run both on windows and linux
  • Comment on Re: shebang line for Perl scripts under Apache/Windows

Replies are listed 'Best First'.
Re^2: shebang line for Perl scripts under Apache/Windows
by gellyfish (Monsignor) on Jan 12, 2005 at 11:38 UTC

    Are you sure? The execve function that is used to execute the script under Linux won't search the $PATH for an interpreter. On my system with an unqualified '#!perl' I get:

    perl: bad interpreter: No such file or directory
    Of course your experience may be different.

    /J\

Re^2: shebang line for Perl scripts under Apache/Windows
by kutsu (Priest) on Jan 12, 2005 at 14:53 UTC
    It checks the shebang line, ignoring the file association of the file extension. If you use a full path, it must exist — though something as generic as just "perl" works too.

    he said that.

    "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce