In my Perl, I want to use linux merge
command and print its exit code:
system "merge $A $old $new";
print "exit code= $?\n";
And in linux manual, the exit code for merge
command should be:
Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
But in fact my result is :
merge: warning: conflicts during merge
exit code= 256
it looks like the exit code is "256" not "1". Why cause this situation? and how can I get the correct exit code? Thanks!