http://www.perlmonks.org?node_id=303605


in reply to A serch and replace question

If you are trying to replace the "\n||" with a simple "||", why not simply do this?:
$data =~ s/\n\|\|/\|\|/g;