in reply to SOLVED: performance of repeated "$samevareachtime=~ s/etc/etc" idiom
They're not just matches ... they're translations. It's not unlikely for several of them to modify the string.
my $s = " the quick red fox jumped over the lazy brown dog "; $s =~ s/^\s+//; $s =~ s/\s+$//; $s =~ s/(brown|red)/color/g; print "<$s>\n";
should give you:
<the quick color fox jumped over the lazy color dog>
...roboticus
|
|---|