Use system instead of backticks:
my $output = system($exec); print ($output >> 8), "\n";
Update: If you need to capture the output as well as the return value of the external application, use Capture::Tiny. See the recent thread Problem logging STDOUT in perl.
Hope that helps,
Athanasius <°(((>< contra mundum
In reply to Re: How to catch the return code of another program?
by Athanasius
in thread How to catch the return code of another program?
by hary536
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |