in reply to pack/unpack binary file

You should show your pack code, or it will be very hard to help see what's wrong with it.

Make sure you're using binmode too.