Perl uses a special hash %ENV which contains the values for all environment variables. example: $path = $ENV{'PATH'}; You can also use %ENV to set environment variables $ENV{'EDITOR'} = '/usr/bin/vi'; which means you could easily bypass the BASH script to do the same thing which might save you some overhead. Hope that helps.