use String::Escape qw( unprintable ); print unprintable( "\\n" );