my @row=(); my $separator=','; foreach (@row) { s/(\\+)/$1$1/g; } print join($separator, @row); print "\n"; __DATA__ aa,bb,\\c\c\,d\d