sub b2i { return split //, unpack('b*', @_); } #### sub b2i { my $bitstring = unpack('b*', @_); $bitstring =~ s/0+$//; return split //, $bitstring; }