in reply to Insecure switch while working in ENV{PATH}

Your PATH is insecure.

Set it. And use a full path to sendmail (if necessary).

See also man perldiag (search for "Insecure") and man perlsec.