I think your header is a fixed size? It reads correctly for
the first header, but then you change $size in the loop for
the data portion. For the next header, $size is incorrect,
having the size of the last data portion. I quit looking
when I saw this, it may or may not fix all your problems.
I have serious Egg on my face. YuckFoo is correct, after pulling my data I did not reset my size back to the size of the header. Once I did this my sample script ran through the entire bin file checking the header Ids and made it through the file no problem. I will still have to go back and verify this but my problem seems to be solved. Thank you all!!!
As a side note, I have always been impressed with the fact that no matter what the question may be, or in my case how dense the writer of the question, someone always answers whatever gets posted. This may not always be the case but it has been for me. Thanks you all. Because it is this type of support that makes this site what it is, one of my favorites