Well, you don't really need a hash. Where is your list of 5-to-10-digit zip codes? Are you getting it from a flat file? From a database? There's no point in making a hash of all those zips unless you plan on using them more than once in a program, and if it's a CGI, then you won't. So skip that step.