in reply to Reading Binary

Not a complete solution, but a hint to point you in the right direction:
use strict; use warnings; my $byte = 'X'; my $binary = unpack('b*', $byte); print $binary; # prints 00011010