Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Issue with env variables set through dos batch

by ikegami (Patriarch)
on Oct 13, 2011 at 16:55 UTC ( [id://931318]=note: print w/replies, xml ) Need Help??

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;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-28 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found