in reply to Process exit status

The strange thing ... Why is the process exit code, when I get in the parent program a multiple of 256 of the real process exit code of the child program?

Because that is how system is documented to work

See also IPC::System::Simple

Replies are listed 'Best First'.
Re^2: Process exit status
by Anonymous Monk on Jul 22, 2011 at 11:36 UTC
    $ perl -le " print system( qw[ perl -e exit(2) ] )" 512 $ perl -le " print system( qw[ perl -e exit(2) ] ) >> 8" 2 $ perl -MIPC::System::Simple=system -le " system( qw[ perl -e exit(2) + ] ) " "perl" unexpectedly returned exit value 2 at -e line 1 $ perl -Mautodie=system -le " system( q[perl -e exit(2) ] ) " "perl -e exit(2) " unexpectedly returned exit value 2 at (eval 10) lin +e 13 at -e line 1