- or download this
REM run the script that sets environment variable FOO
call foo.bat
...
REM Corion;s suggestion: if you need the entire environment
REM set called by itself dumps one line each VAR=VALUE
set
- or download this
REM run the script that sets environment variable FOO
call foo.bat
...
REM my suggestion: send just a few to stdout
echo FOO=%FOO%
echo BAR=%BAR%
- or download this
use strict;
use warnings;
...
$sAssignment =~ /^(\w+)=(.*)$/;
$ENV{$1}=$2;
}