Matt,
Thank you for troubleshooting. Well done!
(unfortunately I cannot reproduce the problem here,
or I would have chimed in earlier).
> Forgive my possible perl/code ignorance here, but would something like
> this
> help with any performance degradation caused by my initial patch:
>
> my $line = \$_[1];
> while ($$line =~ '.$pat.'g) {
>
> Or does it amount to more or less the same thing as my original patch?
> I'm not completely clear in how perl handles references and didn't
> really do anything more than a cursory test on it (which worked).
It would be worth understanding first what actually happens
down below, and search for a fix later. Otherwise we risk
coming across the same issue elsewhere or resurrecting it
later after some other unrelated change.
Mark