in reply to Binary file trouble

Check out Data::HexDump, which will take a binary string and convert it into a nice readable hex dump.

Your code is basically reading 8 BYTES at a time, and trying to pack this string further. You probably want to be using unpack against each character/byte of the string.

print join(" ", unpack('c*', $string));
Either way, Data::HexDump will solve the problem you're apparently trying to solve. Good luck.