|
Any perl people in the house?
I'm trying to develop a script that searches through a simple .txt file and returns all the records matching a search query.
This is the general format of the .txt file
xxx----somecategory----123Mb
yyy----someothercategory----456Mb
zzz----onemorecategory---789Mb
Then, someone specifies a query through my site and I need to check whether any of the records in the .txt file match the query by scanning through the xxx, yyy, zzz parts.
Here's the snag, I have 50,000 entries in the .txt file so a simple foreach loop takes way too long.
Any ideas?
|