If the process has differing real and effective UIDs, then perl assumes you're running a setuid script and turns on tainting automatically. This may be what's happening to you; in which case, try changing both real and effective UIDs.
Dave.
Comment on Re: Insecure dependency in connect while running with -T switch