in reply to "exit 1" and "exit(1)" are apparently not the same
This has nothing to do with Perl. You are using cmd's exit. And there's no reason to believe the shell command exit(1) is valid.
Correct usage:
>cmd /c "exit 1" >echo %ERRORLEVEL% 1
Incorrect usage:
>cmd /c "exit(1)" >echo %ERRORLEVEL% 0
I would have expected "is not recognized" or a syntax error. But whatever. Garbage in, garbage out.
What happens is that exit(1) is treated as equivalent to exit (1), and (1) is numified to zero.
>perl() Can't open perl script "()": No such file or directory
|
|---|