note
AnomalousMonk
<p>
Another approach (\K available with 5.10+):
</P>
<c>
>perl -wMstrict -le
"my $nth = 4;
my $str = 'a,bb,ccc,dddd,eeeee,ffffff';
;;
--$nth;
$str =~ s{ (?: , [^,]*){$nth} \K , }{|}xms;
print qq{'$str'};
"
'a,bb,ccc,dddd|eeeee,ffffff'
</C>
1004836
1004836