in reply to An array of boolean values in a bitfield

You can save another ~25% or so on large bitstrings by avoiding duplicating the bitvector. Just use the aliasing nature of the elements of @_:

sub unpack_count_ref { my $count = unpack("%32b*", $_[ 0 ] ); return $count; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."