sub unpack_count { my ( $bits ) = @_; my $count = unpack '%32b*', $bits; return $count; }