Nicholas Clark wrote:
> but in the scope of use integer signed integers are used:
>
> $ perl -we '$a = 0xDEADBEEF; {use integer; $b = $a >> 4} printf "%08X\n%08X\n", $a,
>$b'
> DEADBEEF
> FDEADBEE
>
> [Actually, IIRC it's up to the C implementation what it does, but for both
> platforms I've just tried one gets the above result]
I, for one, am perturbed by the C behavior.
I would rather, if it's going to sign-extend, that it have yielded
8deadbee.
But I suspect the behavior is defined by ANSI to have
>>n == (>>1)*n
--
John Douglas Porter