in reply to Appending lines starting with white space to the previous line
Essentially, it compounds the entire data file into a single string from which any occurrence of \n\s+ is then removed. The latter string sequence is the one which occurs at every line end except for those line ends before a firstline.( my $line = ( join "", <> ) ) =~ s/\n\s+//g; print $line; ______DATA_______ firstline54324563213612531436436463246324634 secondlidfndsfdsfdsfd thirdlinedsfsdf firstline54324563213612531436436463246324634 secondlidfndsfdsfdsfd thirdlinedsfsdf fourthlinedsfsdf fifthlinedsfsdf _____OUTPUT______ firstline54324563213612531436436463246324634secondlidfndsfdsfdsfdthird +linedsfsdf firstline54324563213612531436436463246324634secondlidfndsfdsfdsfdthird +linedsfsdffourthlinedsfsdffifthlinedsfsdf
|
|---|