Problems? Is your data what you think it is? | |
PerlMonks |
Re: Searching text filesby nferraz (Monk) |
on Sep 14, 2006 at 18:57 UTC ( [id://572976]=note: print w/replies, xml ) | Need Help?? |
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:
The second script simply ties the CDB to a hash and look for a key:
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.
In Section
Seekers of Perl Wisdom
|
|