in reply to perl and windows batch
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl and windows batch
by Anonymous Monk on Jan 08, 2011 at 17:07 UTC |