in reply to Search a text in a file
If all the data you have is a flat text file, that's how you gotta do it.
If you are searching the same file(s) over and over and can afford some overhead in storage, you should build a so-called inverted index. That's how search engines work. There's even a module on CPAN to make this easier for you: Search::InvertedIndex.
Makeshifts last the longest.
|
|---|