my $s = open(APP,"-|") if ($s) { local @ARGV = '-h'; do 'myscript.pl'; exit; } else { die "Can't fork: $!" unless defined $s; local $/; my $scriptoutput = <APP>; close APP; }
But that's probably just making it too complex.
* completely untested code.
In reply to Re^3: shelling out too much
by Joost
in thread shelling out too much
by iblair
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |