in reply to Semicolon seems to be missing?

you forgot to close the double quote in this print statement:
print FH "\nTotal $thit $tmiss $twrong \ ....