in reply to using an external file as a hash

You probably want to have a look at Storable, which allows you to freeze any Perl data-structure in a file, and thaw that into a Perl data-structure at any time (and any program) in the future.

Liz