in reply to How to speed up multiple regex in a loop for a big data?

I don't think I saw this in any of the comments, but some ideas may be:

  • study each line. Take a look at the perldoc about that one; it may or may not help depending on the number of patterns, the pattern, the line, etc...
  • The '//s' modifier can sometimes help; treating each line as a single line (or the entire file???)
  • Try pre-compiling or inline compiling the expressions: Just some more ideas. They may or may not work, though are nice goodies for the future if not.

    print map{chr}(45,45,104,97,124,124,116,97,45,45);
    ... and I probably posted this while I was at work => whitepages.com | inc.