Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: bit array comparisonby ikegami (Patriarch) |
on Oct 22, 2019 at 14:19 UTC ( [id://11107850]=note: print w/replies, xml ) | Need Help?? |
The problem is that unpack "b*" takes a string of bytes. And so does unpack "B*", what you'd use to get the bits in the same order as sprintf "%b".
Tip: you should use | rather than + to set a bit (in case it's already set).
In Section
Seekers of Perl Wisdom
|
|