http://www.perlmonks.org?node_id=351476


in reply to Re: Re: UNIX environment setup via perl
in thread UNIX environment setup via perl

You can't manipulate environment variables for your parent processes. Why? It's a security concern.

But: Your shell can use the output of your perl programm to set it's own environment:

# perl -lw print "export FOO=bar"; # assuming bourne-compatible shell

Later in your (parent) shell:

$ eval `your_perl_script.pl` $ echo $FOO bar $

-- Frank