Run "somebinary" either in myscript.pl itself, or a Perl wrapper around both, to get the exit code besides the output. Search for pipe related documentation; some of which are IPC::Run & IPC::Open3.
In reply to Re: Capturing the stdout and exit code from a program piped to perl
by Anonymous Monk
in thread Capturing the stdout and exit code from a program piped to perl
by pattyj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |