yes, that's possible, but why don't you show the code you tested?
I modified my example and the result looks like the wanted...
while ( my $line = <DATA> ) { chomp $line; # remove the spaces from start of line if ( ! ( $line =~ s/^\s+// ) ) { print "\n" if $. != 1; } # remove spaces from end of line $line =~ s/\s+$//; print $line; } __DATA__ firstline54324563213612531436436463246324634 secondlidfndsfdsfdsfd thirdlinedsfsdf firstline54324563213612531436436463246324634 secondlidfndsfdsfdsfd thirdlinedsfsdf
Result:
$ perl guess.pl firstline54324563213612531436436463246324634secondlidfndsfdsfdsfdthird +linedsfsdf firstline54324563213612531436436463246324634secondlidfndsfdsfdsfdthird +linedsfsdf
In reply to Re^2: Appending lines starting with white space to the previous line
by linuxer
in thread Appending lines starting with white space to the previous line
by ashok13123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |