in reply to Re^2: passing a variable from shell script to the main perl
in thread passing a variable from shell script to the main perl
How are you calling your shell script? Are you using system?
system("shell.sh");
Any changes that your shell.sh script makes to the %ENV will not stay after the system command is finished. Instead, simply have your shell.sh script echo some text that your perl script can capture when using backticks.
shell.shmy $results = `shell.sh`; if ($results =~ /Hello World/) { print "tada!"; }
echo "Hello world";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: passing a variable from shell script to the main perl
by vbynagari (Initiate) on Apr 05, 2011 at 22:22 UTC |