in reply to Re^3: How to remove white space and more than a particular number of new lines!
in thread How to remove white space and more than a particular number of new lines!

i used this,

$string =~ s/\t/ /g; $string =~ s/^\s*$//g;

but the white spaced lines was not getting replaced.

  • Comment on Re^4: How to remove white space and more than a particular number of new lines!
  • Download Code

Replies are listed 'Best First'.
Re^5: How to remove white space and more than a particular number of new lines!
by choroba (Cardinal) on Apr 14, 2014 at 07:33 UTC
    Are you sure there is nothing but whitespace on the whole line?
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      White spaces and tabs only.