Oh dear, I really thought that the <> operator reset the position in the file (did an automatic seek(FH,0,0) for you) after the file had been exhausted. But now I realize that would be kind of bad in certain cases.