#! perl -slw use strict; print 'Successful command returning 1'; system 'c:/perl/bin/perl.exe -e"sleep 5; exit 1"'; print "![$!] ?[@{[$?, ':', $?>>8]}] E[$^E]"; print "\nNonexistant command, attempted direct but fallback to via cmd"; system 'c:/doesNotExists.exe'; print "![$!] ?[@{[$?, ':', $?>>8]}] E[$^E]"; print "\nNonexistant via cmd because of the presence of shell chars sending stderr >null"; system 'c:/doesNotExists.exe 2>null'; print "![$!] ?[@{[$?, ':', $?>>8]}] E[$^E]"; __END__ c:\test>junk Successful command returning 1 ![Bad file descriptor] ?[256 : 1] E[] Nonexistent command, attempted direct but fallback to via cmd 'c:/doesNotExists.exe' is not recognized as an internal or external command, operable program or batch file. ![No such file or directory] ?[256 : 1] E[The system cannot find the file specified] Nonexistent via cmd because of the presence of shell chars sending stderr >null ![No such file or directory] ?[256 : 1] E[The system cannot find the file specified]