http://www.perlmonks.org?node_id=127115


in reply to removing returns from a submited text box

s|\n||gm; will rid you of all newlines (\n) by treating the string as multiple lines. It will also eliminate white space between words. s|\n| |gm; will replace newlines with a space. </CODE>