in reply to passing a variable from shell script to the main perl
Just use backticks.
my $results = `shell.sh`;
Changes to your %ENV made by the shell script will not persist when you return to the perl script. Similarly, changes to the %ENV by your perl script will not stay when it ends either. Although there are "tricks" one can do in theory.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing a variable from shell script to the main perl
by vbynagari (Initiate) on Apr 05, 2011 at 22:09 UTC | |
by wind (Priest) on Apr 05, 2011 at 22:13 UTC | |
by vbynagari (Initiate) on Apr 05, 2011 at 22:22 UTC |