You mean: Why you get different exit codes? (In both cases, the *error* is 0, but on Unix you see exit code 1 and on Windows you see exit code 0). Could it be that on Windows, a shell is running between your perl program and the application, and this is "eating" the exit code of the application? Do you get the same effect if you bypass the shell?
Another thing to try is to replace your application by one where you can control the exit code directly. For instance when I execute (on Windows 2000) the program
use strict;
use warnings;
my $r=qx(set|perl -lwe "print <STDIN>; exit 1");
print "$?\n";
I get correct the exit code 1 (i.e. 256). What do you get in this case?
--
Ronald Fischer <ynnor@mm.st>