in reply to working with enivornment variables in win32
woops didn't login
Hi, I'd like to work with creating an environment variable in perl and wait. Then I would then allow an external process to change that environment variable. The perl code will basically loop and wait until environment variable is set at say 0 then continue. The following code does not work. changing the environment variable externally does not propogate to perl's environment variable setting even if I use setx or set. Looks like perl only sees the environment variables of it's own session. Help.
`setx nas_scratch 0 -m`; (@queueitems)=split(/\s+/,$lineitem); foreach (@queueitems) { my $tapeid = $_; $ENV{NAS_SCRATCH}=$tapeid; ## shell out to Junction command using oprcmd? while ($ENV{NAS_SCRATCH} != 0) {## wait until external command finishes sleep(5); ## hold 5 secs and check again }
|
|---|