in reply to Reading binary data

0x1a = \cZ, or a DOS end-of-file marker. It sounds like you're running under DOS/Win32. Try using binmode on the filehandle.