in reply to Appending lines starting with white space to the previous line
open(FILE,"f1") or die $!; while(<FILE>){if($_!~/^\s+/){push(@array1,'>>'.$_);}else{push(@array1, +$_);}} $array=join('',@array1); $array=~s/\s+//g; $array=~s/>>/\n/g; print $array;
|
|---|