Help for this page

Select Code to Download


  1. or download this
    # successful command and exit code
    system ('dir');
    ...
    # UN-successful command and exit code
    system ('dri');
    print qq(ERR Code = $?\n);
    
  2. 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.
    
  3. or download this
    if %ERRORLEVEL% 2 perl -x -S %0 %*