#! perl use strict; use warnings; print "\nno integer\n"; my $bit = -1 >> 31; printf "unmasked: 0x%x = %d\n", $bit, $bit; $bit = (-1 & 0x80000000) >> 31; printf "masked: 0x%x = %d\n", $bit, $bit; use integer; print "\nuse integer\n"; $bit = -1 >> 31; printf "unmasked: 0x%x = %d\n", $bit, $bit; $bit = (-1 & 0x80000000) >> 31; printf "masked: 0x%x = %d\n", $bit, $bit;