in reply to A string from a file

No reason to escape your quotes as you aren't using quotes as delimiters here. If you want the '\n's turned into newlines, then do it: s/\\n/\n/g and put that "g" option on all of your substitutions or follow the other advice given in this thread.

Oh, and if you want to be able to include '\n' in the output by putting, for example, \\n, in the file, then you have to trickier:

my %escape; @escape{qw(a l t n e r f)}= split /(.)/s, "\a\l\t\n\e\r\f"; s/\(.)/ $escape{$1} || $1 /ges;
to show just one way. (:

        - tye (but my friends call me "Tye")