$ perl -E'qx(thereisnosuchcommand); say "$? $!"' -1 No such file or directory