in reply to Re: need both from system-call
in thread need both from system-call

Look under "exit status" of the camel book. $? is the entire 16 bit status code. You only want the last 8 bits.

This will fix your code: $status = $? >> 8; bb