in reply to fast lookups in files

DBM::Deep is an ideal solution for this problem. Building the DBM file might take a little time, but lookups would be pretty quick. And, it's about as simple an implementation as you could want.
my $db = DBM::Deep->new( $filename ); print "$db->{32}\n"; # prints 14456

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?