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:
- my $regex = qr/<--some regex-->/; $line =~ $regex; if they are constant-ish
- Or use the '//o' modifier to compile the regex in a loop. (this one may not help you as much)
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.