I need to escape \n so on output I really get newline or tab
$ perl -p -e 's/e/a/ge'
now I want each e to be substituted with \n
$ perl -p -e 's/e/\n/ge'
but even \n gives me an error.
this was a simplified example. In real script(makefile) I have
substitute := perl -p -e 's/@([^@]+)@/defined $$ENV{$$1} ? $$ENV{$$1} : $$1/ge'
and in target I have such a nice command
$(substitute) $< > $@
and if the input file for perl contains \n
at output I will see it literally... I want to have real newline.