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
In reply to Re: performance of repeated "$samevareachtime=~ s/etc/etc" idiom
by roboticus
in thread SOLVED: performance of repeated "$samevareachtime=~ s/etc/etc" idiom
by stabu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |