in reply to comparing bit vectors

Is there a better way to see if a bit vector has all its bits set to '0'?

Yes. Combine the checksumming (%nn) and bit (b*) formats of unpack:

## 800 zero bits $bitVec = chr(0) x 100;; print unpack '%32b*', $bitVec;; 0 ## Set 1 bit in the middle substr $bitVec, 50, 1, chr(1);; print unpack '%32b*', $bitVec;; 1 ## set 8 bits in the middle [0] Perl> substr $bitVec, 50, 1, chr(255);; [0] Perl> print unpack '%32b*', $bitVec;; 8

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."