$ perl -le 'for (0..3) { system( "Idonotexist $_" ) }' $ perl -le 'for (0..3) { system( "Idonotexist $_" ) == 0 or warn "system problem (exit $?): $!\n" }' system problem (exit -1): No such file or directory system problem (exit -1): No such file or directory system problem (exit -1): No such file or directory system problem (exit -1): No such file or directory $