Help for this page

Select Code to Download


  1. or download this
    :: test.bat
    @echo off
    echo FOO=foo
    echo BAR=bar
    
  2. or download this
    for (split /\n/, `test.bat`) {
       my ($k, $v) = split /=/, $_, 2;
       $ENV{$k} = $v;
    }
    
  3. or download this
    :: wrapper.bat
    @echo off
    call existing.bat
    set
    
  4. or download this
    :: existing.bat
    @echo off
    set FOO=foo
    set BAR=bar
    
  5. or download this
    for (split /\n/, `wrapper.bat`) {
       my ($k, $v) = split /=/, $_, 2;
       $ENV{$k} = $v;
    }