There's obviously somethine wrong with the file. If slurping didn't work, and the same stuff works for other files then the OS is at fault. I think. Perl is not sensitive to the content of the file. The readline library - perhaps you can say that, but generally no. I think the lines are simply not there. Rewrite the file to a new one, and see if the problem returns.