You can use vec for this
#!/usr/bin/perl use strict; use warnings; my @letter = 'A'..'Z'; my $bits = pack "b*", "1001"; for (0..8*length($bits)-1) { print $letter[$_] if vec($bits,$_,1); } print "\n";
Good Day,
Dean
In reply to Re: Reading Binary
by duelafn
in thread Reading Binary
by BoulderBuff64
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |