Downvoted: Because the OP stated that his non-threaded version works fine; and he's trying to use threading to speed it up.

How could moving from his two memory-based hashes, to disk-based tied hashes "speed things up", when they are at least 1000 times slower.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

In reply to Re^2: Using threads to process multiple files by BrowserUk
in thread Using threads to process multiple files by anli_

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":