...oops, I guess I finished my post after you'd already seen a similar answer.
You're right that it's expensive to keep the list in memory, but it will be the fastest, and we're not talking a lot of memory here (given a list with words on average the size of the words in the Unix dictionary).
Reading things into the hash is not he most elegant solution, and someone will no doubt come along here in a moment with a suggestion for a module that does more closely what you desire, but I wouldn't discount the simplest approach, unless your program will have other memory intensive techniques that cannot be avoided.
...All the world looks like -well- all the world,
when your hammer is Perl.
---v