Also see exit and perlvar for $? and how it is constructed in Perl.
In reply to Re: native exit codes 512 and 2304 by Corion in thread native exit codes 512 and 2304 by petr999