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


in reply to Re^2: Problem with String replace in file
in thread Problem with String replace in file

\n will result in a newline.
\N will result in a syntax error.
\\N will give \N.

If you're not getting \N from \\N, there's something you haven't showed us.

Update: meraxes caught the problem.