in reply to swapping PIPE for comma in CSV file

all you need is not_quote-comma-quote, quote-comma-quote, and quote-comma-not_quote:

echo <DATA> | perl -F'(?<=[^"]),(?=")|(?<="),(?=")|(?<="),(?=[^"])' -lane 'print join("|",@F)'

though i could be wrong, i just learned about look-ahead/behind today
--jd