Help for this page

Select Code to Download


  1. 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
    
  2. 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%
    
  3. or download this
    use strict;
    use warnings;
    ...
      $sAssignment =~ /^(\w+)=(.*)$/;
      $ENV{$1}=$2;
    }