Help for this page

Select Code to Download


  1. or download this
    my $i= 0;
    $str =~ s/(...)/ 3 == ++$i ? 'fish' : $1 /ge;
    
  2. or download this
    my $i = 3;
    0 while $str =~ /fsih/gi && --$i;
    substr( $str, $-[0], $+[0]-$-[0], 'fish' )   if  ! $i;