in reply to [Win32] Successful system() call returns 256
An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble.My unix diff returns 1 (not 0, as you expect) if there is a difference between the files (at the command line).
But, the situation is a little different from within a Perl script. From system
The return value is the exit status of the program as returned by the wait call. To get the actual exit value, shift right by eight (see below).This prints 1 for me on linux:
print $? >> 8, "\n";
Update: major re-wording.
|
|---|