in reply to setting env variable while stroring prev values of that variable

Perhaps something like

$ENV{LSF_PATH} .= $separator . $new_item;

will work, where $separator is whatever is used to separate elements in a path (on Windows, I believe this is a semi-colon) and $new_item is the value you're adding to LSF_PATH. Pushing it into @LSF_PATH won't work without subsequently doing something like

$ENV{LSF_PATH} = join($separator, @LSF_PATH);

I don't think changes to the %ENV hash propogate to the environment from which Perl was called.

emc

"Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. "
—G. Steele