Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Problem with String replace in fileby philosophia (Sexton) |
on Oct 22, 2007 at 17:11 UTC ( [id://646502]=perlquestion: print w/replies, xml ) | Need Help?? |
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?
Back to
Seekers of Perl Wisdom
|
|