in reply to Looping through a binary file

I don't work with EBCDIC now, but if you want to, I would suggest that you examine and read: http://perldoc.perl.org/perlebcdic.html very closely.