in reply to Appending lines starting with white space to the previous line

hi, have a try of this code
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;
  • Comment on Re: Appending lines starting with white space to the previous line
  • Download Code