in reply to Changing ENV values locally

a program cannot change the outside environment - thus, after the program was done, the environment is back to original.

for the localizing of %ENV, try

print $ENV{TERM}; { local %ENV = %ENV; $ENV{TERM} = "bla"; print `echo \$TERM`; } print $ENV{TERM};