Using Taint mode Include '-T' on your command line: #!/usr/bin/perl -T # Sanitize the environment for shell schtuff delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) }; # Pick an explicit path $ENV{PATH} = "/bin:/usr/bin:/usr/local/bin";