Caller.pl --> Wrapper.cmd --> hello.exe
hello.exe returns the input parameter.
Wrapper.cmd
----------------------
@%1 %2 %3 %4 %5 %6 %7 %8 %9
@echo %ERRORLEVEL%
Caller.pl
-----------------
#!/usr/bin/perl
my $code = 'c:/executables/hello.exe';
my @out = `./Wrapper.cmd "$code" 1234`;
my $rc = pop @out;
print " return code = $rc\n";
print "\nThe Program Output Follows Here:\n";
print join '',@out;;