I am using binmode as in the OP, but I am seeing some strange behavior. With one of my input files it did skip "0a" bytes. I created a new test file with some "0a" bytes, but with this file it worked correctly, not skipping the "0a" bytes as you suggested. I am doing more investigation to see what's really going on.