in reply to Single newline removal when line exceeds x characters
perl -00 -lpe 's/(.{40})\n/$1 /g' file [download]
-- John.