in reply to return a variable from command line execution to perl
So, how does the child process communicate the "property" and the "key" to the calling process?
If that cmd only sets the value in the environment, you will have to call that .cmd in a way very similar (but different to) Get default login environment.
Maybe the following works as another wrapper .cmd file:
@echo off cd /d %~dp0 call set_prop.cmd db.server.name dbserver set
You would then use the output of that intermediate .cmd file as follows from Perl:
my @output= qx(get_property_values.cmd); chomp @output; print "Got output [$_]" for @output;
Alternatively, see perlipc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: return a variable from command line execution to perl
by sss (Initiate) on Aug 15, 2014 at 15:04 UTC | |
by Anonymous Monk on Aug 16, 2014 at 14:45 UTC |