Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How do I remove blank lines from text files?

by ahunter (Monk)
on Jul 10, 2000 at 21:42 UTC ( #21831=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      while (<STDIN>)
        {
          print if (!/^$/);
        }
    
  2. or download this
      while (<STDIN>)
        {
          print if (!/^\s*$/);
        }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2020-10-20 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?