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

It will work :)
C:\>perl #!perl -T -- "-T" is on the #! line, it must also be used on the command line at - +line 1.

Replies are listed 'Best First'.
Re^5: .pl or shebang
by ikegami (Patriarch) on May 15, 2009 at 13:36 UTC
    You just showed it not working. -C is another that doesn't work on the shebang.
      No, -T is doing its job. -C is broken.
      C:\>perl #!perl -C -- Unknown Unicode option letter ' ' at - line 1. C:\>perl #perl -C2 -- print chr 333; ^Z Wide character in print at - line 2. ō C:\>perl -C2 -e"print chr 333;" ō
        No, -T is doing its job.
        No, it's not. The message you got is not a warning, the program terminates after that. Save this as foo.pl:
        #!perl -T print 42;
        then run it:
        C:\Users\burak\Desktop>perl foo.pl "-T" is on the #! line, it must also be used on the command line at fo +o.pl line 1. C:\Users\burak\Desktop>
        try again with -T on the commandline:
        C:\Users\burak\Desktop>perl -T foo.pl 42 C:\Users\burak\Desktop>