Yes, setting the value of %ENV will automatically set the enverioment variable outside the process, and after the process die it will restore the previous values.
Note that some keys can't be set, for example, on Win2K we can't set wrong keys like PATH, PATHEXT e HOMEPATH. But if you are just setting a new key it will work just fine.
Graciliano M. P.
"Creativity is the expression of the liberty".
| [reply] |
That seems like a confusing way to look at it. At least under Unix, setting %ENV will set the environment variable in the running Perl process. That environment is inherited by all processes which are started from that process. The environment is never "changed back"; when the process exits, its environment goes away with all of its other data.
| [reply] [d/l] |