Interrupted: I have to turn off my computer and it stops the code from running.
What is the flush step? It is truncating the database whenever it is initialized with that tie command and writes to the hash. So maybe I need to put a flush statement into an END block?