$ENV{IM_ROOT} = $TC_ROOT; # set IM_ROOT $ENV{IM_DATA} |= $TC_DATA; # set IM_DATA if not already set system qw(program -switch argument); # program sees new values of IM_ROOT and IM_DATA { # this value of IM_DATA is only seen while this block is executing local $ENV{IM_DATA} = $TC_DATA; system qw(program -switch argument); }