> > >>This code:
> > >>
> > >>#!/usr/local/bin/perl -wT
> > >>use strict;
> > >>use CGI;
> > >>my $q = new CGI;
> > >>print ("hi");
> > >>exit;
> > >>
> > >>produces this:
> > >>"Too late for "-T" option at w:\cgi-bin\admin\tainttest.pl line 1."
> > >
> > >The problem is that -T needs to be enabled so early in the invocation
> > >process that by the time a "perl foo.pl" command sees the shebang line,
> > >it's too late to set it.  This also applies to the way .pl scripts are
> > >invoked on DOSish systems through file type associations.
> >Thanks to everyone who replied to all this so quickly. The server I use
(not
> >mine, web hosting service) is a Linux machine running Apache. I still get
> >the error on same error on the server ... am I just SOL when it comes to
> >taint checking or is there a way to smack the server around and make it
do
> >what it sounds like it should be doing?
>
> See, if you post paths like w:\cgi-bin\admin\tainttest.pl then people are
> going to assume you're on DOS unless you say otherwise.  I don't see how
> you could have gotten that message from a Linux machine, so can you be
> explicit about exactly what is happening on the Linux box?  Taint checking
> works just fine on Linux and you don't have to do anything special.

Sorry about not being clear about what the server is spitting out. Here's
what comes out of the server log:

06/05/01 16:55 "/cgi/admin/tainttest2.pl", proc "/usr/local/bin/perl":
Too late for "-T" option at /cgi/admin/tainttest2.pl line 1.

And, here's the code again (I switched the T and the w, just to see if it
made a difference):

#!/usr/local/bin/perl -Tw
use strict;
use CGI;
my $q = new CGI;
print ("hi");
exit;

Without the -T, the server doesn't generate an error.

(BTW: I know that this doesn't display anything in the browser ... I'm just
trying to figure out what the -T generates that "too late" error.)

Mark.


Reply via email to