Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by graff (Chancellor)
on Apr 14, 2014 at 02:06 UTC ( #1082179=note: print w/ replies, xml ) Need Help??


in reply to Re^2: 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!

Show us the actual code that you used when you "tried to capture whitespaces". Also tell us what "its not working" really means: what did it do, and how did that differ from what you wanted to do. These details will help us help you.


Comment on Re^3: How to remove white space and more than a particular number of new lines!
Replies are listed 'Best First'.
Re^4: How to remove white space and more than a particular number of new lines!
by Anonymous Monk on Apr 14, 2014 at 03:53 UTC

    i used this,

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

    but the white spaced lines was not getting replaced.

      Are you sure there is nothing but whitespace on the whole line?
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        White spaces and tabs only.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2015-07-31 05:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls