in reply to Searching text files

My first suggestion is that you do not start an application by creating the GUI. Start with a simple command-line script which will solve your problem, and make sure it works; they you can play with UI.

Now, the fastest solution is, IMO, the use of CDB_File. It will return data in a fraction of millisecond.

It usually takes two scripts: the first one is used to create a CDB file from your data:

use CDB_File; $t = new CDB_File ('t.cdb', "t.$$") or die ...; $t->insert('key', 'value'); $t->finish;

The second script simply ties the CDB to a hash and look for a key:

use CDB_File; tie %data, 'CDB_File', $filename or die "$0: can't tie to $filename: $!\n"; if (defined $data{}) { # ... }

That's it! The fact that it doesn't require a relational database will make it easier to set up your application. Think about that!

Finally, take a look at Tie::File::AsHash -- it can be usefull.