$ perl -le'qx{date abc}; print $?' date: invalid date `abc' 256 #### $ perl -le'qx{cat some file}; print $?' cat: some: No such file or directory cat: file: No such file or directory 256 $ perl -le'qx{cat "some file"}; print $?' 0 #### $ perl -le'qx{echo foo | grep bar}; print $?' 256 $ perl -le'qx{echo foo | grep foo}; print $?' 0