in reply to Insecure switch while working in ENV{PATH}
Set it. And use a full path to sendmail (if necessary).
See also man perldiag (search for "Insecure") and man perlsec.