I don't really know what a "filter driver" is, so I still don't understand the rationale for using system calls where perl built-ins are available for the same operations. No big deal, whatever.
In any case, I wonder whether you may have missed the point of the earlier reply from almut:
... [system()] returns the exit code (return value of the wait call) of the called program, which is typically zero upon success...
What that means is that a statement like this:
system( $some_shell_command ) or die "bad news..."
will actually cause the script to die when the system() call succeeds, because a return value of zero (false) from system() means that there was no error indicated in the exit status of the command. A less confusing idiom for doing this sort of error trapping with system() goes like this:
$failed = system( $some_command );
die "bad news..." if ( $failed );
|