http://www.perlmonks.org?node_id=1007993


in reply to finding strings

I don't have time to work through it at the moment, but I think you'll be more successful using a Suffix Tree. There are a couple of CPAN modules: Tree::Suffix, and SuffixTree. The latter is written in C and bound to Perl via SWIG. It's an old module, but might be useful.


Dave