http://qs1969.pair.com?node_id=1077618


in reply to Replace new line with white space

Help me understand what you're asking. A newline (\n) is a species of whitespace. Do you mean replace each newline with a space character, i.e., " " (\x20)? If so, you can:

s/\n/ /g;