in reply to Re: .pl or shebang
in thread .pl or shebang

the shebang line is ignored on windows

Not ignored *completely*. Switches such as '-l', '-w', and '-T', are honoured - and, last time I checked, the shebang line (if present) had to match the string 'perl'.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: .pl or shebang
by Anonymous Monk on May 15, 2009 at 07:21 UTC
    yup
    C:\>perl #!/usr/bin/PYTHON -T -- Can't exec /usr/bin/PYTHON at - line 1. C:\>

      From perlrun:

      If the #! line does not contain the word "perl", the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don’t do #!, because they can tell a program that their SHELL is /usr/bin/perl, and Perl will then dispatch the program to the correct interpreter for them.

      (just in case anyone wondered what's going on...)

Re^3: .pl or shebang
by Burak (Chaplain) on May 15, 2009 at 09:30 UTC
    "-T" in the file will not work. You have to change the executable path in the registry and add it or call it from the cmdline: "perl -T foo.pl"
      It will work :)
      C:\>perl #!perl -T -- "-T" is on the #! line, it must also be used on the command line at - +line 1.
        You just showed it not working. -C is another that doesn't work on the shebang.