in reply to Single newline removal when line exceeds x characters


Here is a one-liner that reads a file in paragraph mode and then removes newlines if they terminate a line longer than or equal to some limit (in this case 40):
perl -00 -lpe 's/(.{40})\n/$1 /g' file

--
John.