in reply to Removing space at end of field and converting to text
For linebreaks in the middle of the text, and coming from different machines, this works for me:$field =~ s/\s+$//;
if ($field =~ m/\r/) { $field =~ s/\n//g; $field =~ s/\r/<br>/g; } elsif ($field =~ m/\n/) { $field =~ s/\n/<br>/g; }
|
|---|