in reply to Optimizing string searches

If the strings you are looking for are constants and start similarly, try with perl 5.10.0, it optimizes the heck out of constant alternations.

But probably one of the grep unix (or GNU) tools is faster.