Hi Kurt,

You need to do:

perl -Tc file.cgi

What is happening is that when perl inspects your #! line switches, it sees -T
and tries to put on taint mode, but it is too late to taint things by that
time. This is the explination in perldiag:

       Too late for """"-T"""" option
           (X) The #! line (or local equivalent) in a Perl script
           contains the -T option, but Perl was not invoked with
           -T in its command line.  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.

           If the Perl script is being executed as a command
           using the #!  mechanism (or its local equivalent),
           this error can usually be fixed by editing the #! line
           so that the -T option is a part of Perl's first
           argument: e.g. change perl -n -T to perl -T -n.

           If the Perl script is being executed as perl
           scriptname, then the -T option must appear on the
           command line: perl -T scriptname.

Cheers,
Kevin

On Sun, May 27, 2001 at 01:21:27PM -0400, Kurt Edmiston ([EMAIL PROTECTED]) 
spew-ed forth:
> Hi, I'm trying to use taint mode on one of my cgi programs using the -T flag.
> 
> #!/usr/local/bin/perl -wT
> 
> When I check the syntax with  "perl -c file.cgi" I get the following message:
> 
> Too late for "-T" option at manager.cgi line 1.
> 
> It smells like an error message, but it doesn't seem to affect the 
> execution of the program one bit.  Any ideas what's going on here?
> 
> Thanks,
> Kurt
> 

-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
You have just destroyed one model XQJ-37 nuclear powered pansexual
roto-plooker....and you're gonna have to pay for it.
        -- Frank Zappa

Reply via email to