bb.bat:@echo off exit 3
p.pl:@echo off exit /b 3
output: b.bat exit code is: 3 call b.bat exit code is: 3 b.bat & exit errorlevel exit code is: 3 bb.bat exit code is: 0 call bb.bat exit code is: 3 bb.bat & exit errorlevel exit code is: 3sub test; test 'b.bat'; test 'call b.bat'; test 'b.bat & exit errorlevel'; test 'bb.bat'; test 'call bb.bat'; test 'bb.bat & exit errorlevel'; sub test { local $\ = "\n"; print "@_"; system @_; print ' exit code is: ', $? >> 8; }
In reply to Re: perl and windows batch
by Anonymous Monk
in thread perl and windows batch
by leonidlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |