On 9/4/07, Dan Sopher <[EMAIL PROTECTED]> wrote:
snip
> 1.      What does ($? & 127) mean?
snip

It means binary and $? with 127.  It is useful because the lower seven
bits of $? are set to the signal a child process received that caused
it to die.  Bit eight will be set if there was a core dump.

snip
> 2.      What does $? >> 8  mean?
snip

It means shift the bits of $? to the right eight places.  This is
useful because the exit code from a process is stored in bits 9
through 16 of $?.  We saw what the first eight bits held in the
previous question.  Normally we want to see the exit code as 0 through
255 and bit shifting $? eight places to the right causes this to
happen.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to