in reply to Debugging CGI

This error:
Insecure $ENV{PATH} while running with -T switch at /home/blah/www/www

Means you have to untaint the path environmetn variable like so:
$ENV{'PATH'} = "";