I assume you mean if (!$?) and not if (!?). Anyway.
From perldoc perlvar:
$? The status returned by the last pipe close, backtick (``) command, or system() operator. Note that this is the status word returned by the wait() system call (or else is made up to look like it). Thus, the exit value of the subprocess is actually ($? >> 8), and $? & 127 gives which signal, if any, the process died from, and $? & 128 reports whether there was a core dump. (Mnemonic: similar to sh and ksh.)
In other words, your process terminates with an exit status of zero (which should be correct), dying from signal 13, which happens to be SIGPIPE.
Enough hints? :-)
-- TMTOWTDI
In reply to Re: calling an external program, from within a perl script
by trantor
in thread calling an external program, from within a perl script
by nick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |