in reply to Reading from large files

Your file is relatively small, so I doubt the problem is memory. It sounds like your data file may be corrupted, or contain unexpected characters that are somehow telling Perl you've reached the end of the file. You may want to try this with some other data, if that isn't too difficult.