in reply to File handle question

You need to seek back to the beginning of the file. The first loop exhausted it, so the second begins at eof().

After Compline,
Zaxo