> 
> Sometimes I see strange numbers when handling exit status 
> from system calls.
> 
>     my $out = `$cmd`;
>     my $stat = $? >> 8;
> 
> and $stat may contain anumber like  16777215 at this point, 
> whereas on commandline it would be more like 2, or no error 
> at all (0).
> 

Looks like that the number get sign extented, try

my $stat = ($? >> 8) & 0xff ;

Gerald


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to