My question is: is there anything I could have told Perl to give it a hint about how to perform the match...?
I'm wondering if a divide-and-conquer approach might give you the same effect, while being clearer to Perl about how to match without needing to backtrack.
while ( $mmap =~ /^(.*\n)/mg ) { my $line = $1; print $line if $line =~ /$pat/; }
In reply to Re: Surprisingly poor regex performance
by dws
in thread Surprisingly poor regex performance
by sgifford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |