Possible Duplicate:
How do I get the application exit code from a Windows command line?
The Perl script that I'm calling inside batch returns a 1
, 2
, or 3
. What's the syntax for calling this perl sript with an argument 829, and capturing the script's exit code?
Perl.exe listMembership.pl 829 in cmd.exe
@echo off
set retVal=Perl.exe listMembership.pl 829
echo %retVal%