If you want a fast bit counter use unpack:
sub unpack_count { my ( $bits ) = @_; my $count = unpack '%32b*', $bits; return $count; }
In reply to Re: An array of boolean values in a bitfield
by jwkrahn
in thread An array of boolean values in a bitfield
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |