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


in reply to Re: Persistent environment (Windows)
in thread Persistent environment (Windows)

This is correct. The line
system("set monkeylikes=flinging poo");
sets %monkeylikes% for that system call only. You would need Win32::AdminMisc to set the variable permanently, or do
$ENV{'MonkeyLikes'} = "bananas"; print "$ENV{'MonkeyLikes'}\n"; system("echo %monkeylikes%"); $ENV{'MonkeyLikes'} = "flinging poo"; system("echo %monkeylikes%");
for on-the-fly while-the-script-executes kind-of stuff. It yields

bananas
bananas
flinging poo

I believe from the parent post that this is what you are looking for, but that is just my opinion. I could be wrong.

HTH
Dex