- or download this
# successful command and exit code
system ('dir');
...
# UN-successful command and exit code
system ('dri');
print qq(ERR Code = $?\n);
- or download this
C:> set /?
[...]
...
%CMDEXTVERSION% - expands to the current Command Processor Extensions
+version number.
%CMDCMDLINE% - expands to the original command line that invoked the C
+ommand Processor.
- or download this
if %ERRORLEVEL% 2 perl -x -S %0 %*