$text_area =~ s/[\r\n]+//g; #### $text_area =~ s/[\r\n]+/ /g;