in reply to comparing multiple files for patterns

Is this a toy exercise for learning, or have you some non-trivial application? If you have a non-trivial application you really ought to tell us about it because the implementation details depend a great deal on the nature of the application. Things like size of files and length of match strings make a huge difference to how to efficiently implement the search.

Premature optimization is the root of all job security
  • Comment on Re: comparing multiple files for patterns