And the reason is that it's supposed to be a "bitstring" not "numeric bit" operation.
see https://perldoc.perl.org/perlop#Bitwise-String-Operators
hence replacing | with |. under use feature "bitwise" will stop doing hard to predict things, even after refactoring this golfing code.
ugh...
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^6: converting binary to decimal
by LanX
in thread converting binary to decimal
by harangzsolt33
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |