in reply to Removing space at end of field and converting to text
Read perlretut for a refresher on regular expressions. You can use $field =~ s/\n+/<br>/g; to replace runs of newlines with single break tags which may be what you want. Note that you probably want to use \n instead of \\n to replace newline characters instead of pairs of \ and n characters.
Extra newlines should not affect how HTML/XML is parsed so the final rendered text should not be affected by "extra" white space including newline characters.
|
|---|