my $last_5_bits = -9133545115225966845 % 32; # 3
For your example, you'll likely need to use bigint.
In reply to Re: The last 5 bits in perl by kennethk in thread The last 5 bits in perl by sweetser