Pretty late to the game here, but you can accomplish that by printing with single quote characters instead of double quotes.
print 'hello\nthere';
This guy does a pretty good job at explaining:
https://alvinalexander.com/perl/perl-print-printing-in-perl-variables-quotes/