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.
In reply to Re: passing a variable from shell script to the main perl
by wind
in thread passing a variable from shell script to the main perl
by vbynagari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |