Consider this trivial example of fork()ing then waiting for a child to die in Perl:
#!/usr/bin/perl use strict; use warnings; if (fork() == 0) { ex
It's documented in the $? section of the perlvar man page.
$?
i.e. the real exit code is $? >> 8.
$? >> 8