in reply to Re: Chomp in perl
in thread Chomp in perl
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
|
|---|