
zatlas1
Novice
Jun 24, 2011, 11:06 AM
Post #1 of 8
(2119 views)
|
|
Executing 'set' Windows commend from Perl
|
Can't Post
|
|
Hi All 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"); print "$rc\n"; I get return code of 0, indicating that all went well. back to the next command in the batch, I issue set ABC 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? Thanks ZA
|