Jun 24, 2011, 11:06 AM
Post #1 of 8
Executing 'set' Windows commend from Perl
I need to set some local environment variables dynamically for a batch that I run (.cmd file, WinXP.)
I tried to issue a little Perl script from within the batch. To simplify, this is all:
my $rc=system ("set ABC=value");
I get return code of 0, indicating that all went well.
back to the next command in the batch, I issue
and get: 'Environment variable ABC not defined'
if I do this in the batch itself, I have no problem:
Is there a way to make the batch see my set commands?