in reply to print real newlines in place of literal ones
I'm not sure if i understand what you mean.
If you want the literal newlines to be printed try something like this
if not simply print out the string as it is.perl -we 'print qw/Hello\nWorld\n!/' Hello\nWorld\n!
# perl -we 'print "Hello\nWorld\n!"' Hello World !
|
|---|