Help for this page
use strict; use warnings; ... my $str = 'a,b,c,d'; $str =~ s/(,)/!--$n ? '|' : $1/ge; print $str;
a,b|c,d