in reply to How to localize conditionally?
local $ENV{BLAH} = condition ? 42 : $ENV{BLAH}; [download]