in reply to Chomp in perl
#!/usr/bin/perl use warnings; use 5.16.2; $/ = "\n+"; while (<DATA>) { if ($_ =~ m/\+/) { s/\n\+//; } print; } [download]
Added __DATA__
#!/usr/bin/perl use warnings; use 5.16.2; $/ = "\n+"; while (<DATA>) { if ($_ =~ m/\+/) { s/\n\+//; } print; } say ''; __DATA__ xabcd a1 +b1 +b2 +b3 +b4 +b5 abcd xcdef c1 +d1 +d2 +d3 +d4 +cdef [download]