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

philosophia has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to replace || with |\N| in a text file. I'm using

open (IN, $filename);

while (<IN>){
s/||/|\\N|/;
print IN;
}

close IN;


It doesn't seem to be working. It seems to be replacing || with |N|. How can I fix this?