in reply to Catching expressions from a file

The problem is that I'm getting duplicated items in the hash.

That isn't possible, hashes don't keep duplicates, they're hashes

Can anyone help me out here?

Not with the information presented. See Re: String extract 2 ask better questions (code that compiles, clearly stated goals, sample input, wanted output, the output you actually get and explanation of why its wrong)