$ perl -wle 'print join ",", split /\|/, "abc|def"' abc,def $