Dan Muey wrote:

> > $exit_value  = $? >> 8;     bit 8  [0 bit on high byte]
> > $signal_num  = $? & 127;   value of 7 lowest bits
> > $dumped_core = $? & 128;    bit 7 [highest bit of low byte]
>         Just curious, what is happening here with the >> and the &.
>         I see there's a 128 there, perhaps that's where it is coming from?
>
> > print "$exit_value, $signal_num, $dumped_core\n";

Very standard stuff.  It assumes a bitflag of at least two bytes, as the first line
woouldn't work for a char-sized bitflag.  Protocols like this are used in 'nix, 
Windows,
and just about any OS out there.  [though not always in the same contexts]

Joseph



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


Reply via email to