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

No, it's not. The message you got is not a warning, the program terminates after that.
EXACTLY!!!!!! That is what is supposed to happen.

Replies are listed 'Best First'.
Re^9: .pl or shebang
by ikegami (Patriarch) on May 16, 2009 at 10:25 UTC

    -T's job is to turn on taint mode. When on the shebang line, it does not do its job. It may be understandable that it doesn't work, but it cannot be placed on the shebang line instead of the command line as previously stated.

      ??? It dies, protecting your program from running without taint, ie it works.
        I don't see that anywhere in the documentation. That's not it's job. It's like saying exit is the best debugging tool since it prevents all bugs!
        A reply falls below the community's threshold of quality. You may see it by logging in.
Re^9: .pl or shebang
by Jenda (Abbot) on May 16, 2009 at 22:52 UTC

    No. What it is supposed to do is to run the script and die if the script attempts to do anything dangerous with not validated input. The "This is an error because, by the time Perl discovers a -T in a script, it's too late to properly taint everything from the environment. So Perl gives up." in perldiag seems to suggest that this is an implementation issue rather than a deliberate decision. Which is a shame. It would make a lot of things much easier.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.