--marmot$x = 'ababababab'; $i=3; $x =~ s/(^|[^a])a([^a]|$)/$1B$2/ while $i--; print "$x\n" __END__ BbBbBbabab
In reply to Re: Does Perl support a given number of replacements ?
by furry_marmot
in thread Does Perl support a given number of replacements ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |