nysus has asked for the wisdom of the Perl Monks concerning the following question:
I’m writing a utility to go through my personal perl lib to ensure consistency across files. For example, I will use it to check each file has a comment containing the file’s path. So the utility will be going through and repeatedly searching a lot of text files.
There will be hundreds of documents searched repeatedly for certain strings of text. Rather than reinvent the wheel, I hunted around for a module that would help ensure the search was done efficiently both in terms of time and resources used so I don’t have to burden myself with worrying about the many small details. For example, the easiest thing for me to do would be to load all files into memory and simply search, write them back out to disk, load them all back into memory, search, save, repeat. Though this is easy, it’s obviously not efficient and I was hoping to find a module that would smartly determine how to handle this problem.
But I have searched around a bit and have come up empty. Does anyone have any recommendations?
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is there a definitive module for efficiently searching a collection of text files?
by Discipulus (Canon) on Mar 18, 2025 at 10:36 UTC | |
|
Re: Is there a definitive module for efficiently searching a collection of text files?
by sn1987a (Curate) on Mar 18, 2025 at 12:20 UTC | |
by nysus (Parson) on Mar 18, 2025 at 13:04 UTC | |
|
Re: Is there a definitive module for efficiently searching a collection of text files?
by Anonymous Monk on Mar 18, 2025 at 10:32 UTC | |
by nysus (Parson) on Mar 18, 2025 at 12:59 UTC | |
by Marshall (Canon) on Mar 20, 2025 at 23:41 UTC | |
|
Re: Is there a definitive module for efficiently searching a collection of text files?
by Fletch (Bishop) on Mar 18, 2025 at 14:59 UTC |