if( condition() ) { local $ENV{BLAH} = 42; libcall(); } else { libcall(); }