my $count = 3; my $str = "a,b,c,d"; substr $str, $count, 1, '|'; print $str; [download]
In reply to Re: Replace the nth occurence by rcrews in thread Replace the nth occurence by Anonymous Monk