perlquestion
salva
I am wrapping an external executable on Windows that can exit with codes bigger than 255. The issue I am facing is that Perl <c>$?</c> seems to be limited to the combination of one byte for the signal and another byte for the <c>errorlevel</c>. For instance, when the program exits with code 1000 (0x3E8), <c>$?</c> becomes 59392 (0xE800).
<p>Perl has also the variable <c>${^CHILD_ERROR_NATIVE}</c>, but it seems that on Windows it gets the same value as <c>$?</c>.
<p>Does anybody known how to get the real exit code without reverting to using an external module as Win32::Process to start and control the slave processes? (on the other hand, I am already using Win32::API, so solutions using it would be acceptable).