Thank you David for your response: Yes, I'm running MacPerl (actually writing in BBEdit 6), but I'm putting my CGI's in a Unix server. For some reason I get an error from the server if I use the -T switch (Besides the error I get from MacPerl). I latter realized that I get an error also if I wrote '#!/usr/bin/perl-w' instead of '#!/usr/bin/perl -w' (with a space before the -w switch). Is this logical? (I was interpreting all the possible options for the "too late" message, including too late in the line!). Thanks, Riccardo -- mailto:perotti@pobox.com > From: David Steffen <steffen@biomedcomp.com> > Reply-To: David Steffen <steffen@biomedcomp.com> > Date: Sun, 3 Dec 2000 18:23:30 -0600 > To: Riccardo Perotti <perotti@pobox.com>, "macperl-webcgi@macperl.org List" > <macperl-webcgi@macperl.org> > Subject: Re: [MacPerl-WebCGI] "Too late for '-T' option" message > > At 6:28 PM -0500 12/3/00, Riccardo Perotti wrote: > >> I'm writing a simple mailing list script. >> >> I put the -w switch and everything went ok (after correcting some stuff, of >> course). LATER ON I added the T option (as in -wT) but get a >> >> "Too late for '-T' option" message. >> >> What's the deal? > > [I'm assuming you are running a MacPerl CGI because of the list you posted > to.] > > The deal is that perl has to impose taint checking before it starts > reading the script. In Unix, this is normally not a big deal, as the > standard construct: > > #!/usr/bin/perl -T > > ....is actually addressed to the SHELL, and so perl gets the -T before > it starts on the script. In MacPerl, this is not the case; MacPerl > has actually started reading the script before it sees the -T. Thus, > in MacPerl, the above construct will not work. > > In MacPerl, there are two ways of turning on Taint checking: > > 1) You can select it from the Script menu before running the script. > This is not normally useful for a CGI. > > 2) If MacPerl is called by another program using AppleEvents (sort of > like the case of shell scripts on Unix) there is a parameter you can > pass to turn on Taint checking. Thus, there is a different version > of CGI glue which has Taint checking turned on. Depending how and > where you got MacPerl, you may already have this; just poke around > until you find a file (with a Camel Suitcase icon) named "CGI Script > (Taint Check)" and put it in the "MacPerl Extensions" folder. Then, > simply select "CGI Script (Taint Check)" instead of the usual" CGI > Script" when you save your MacPerl CGI. > > I'd offer you my version of "CGI Script (Taint Check)" except I don't > use it much, I have messed around with my MacPerl distribution a lot, > and thus I don't know if mine is the latest version or even if it > works. Poking around, I found this: > > http://pudge.net/macperl/pcgit.html > > I'm sure one of the friendly folks here will let us know if this is > not the most current version. > > HTH > > -David Steffen- > David Steffen, Ph.D. > President, Biomedical Computing, Inc. <http://www.biomedcomp.com/> > Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: steffen@biomedcomp.com > > ==== Want to unsubscribe from this list? > ==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org