Too late for "-T" option

I can't seem to figure out how to get OptiPerl to syntax check my perl files when I include the -T taint mode switch:

#!/usr/bin/perl -wT

If I leave the T option off, syntax checking works beautifully. But with it on, I get the error:

Too late for '-T' option

Any ideas on how to get the syntax checker to work with taint mode enabled?


When running perl under windows, the -T option cannot be added in the shebang line, because perl has already been loaded. This only works under Unix system, which actually loads perl using the shebang.

So in windows, the only way to add tainting checks is to add the parameter in the command line when loading perl, for example

perl -T

This can be done using Run / Prompt & run in console, and setting the parameters as "-wT %pathsn% %ARGV%"

09.03.2005. 22:45

This article hasn't been commented yet.

Write a comment




8 + 2 =