in reply to Replacing a specfied instance of a pattern in a string
my $i= 0;
$str =~ s/(...)/ 3 == ++$i ? 'fish' : $1 /ge;
my $i = 3;
0 while $str =~ /fsih/gi && --$i;
substr( $str, $-, $+-$-, 'fish' ) if ! $i;
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (493 votes). Check out past polls.