Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: Remove whitespace between lines

by Marshall (Canon)
on Feb 04, 2015 at 01:04 UTC ( [id://1115467]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Remove whitespace between lines
in thread Remove whitespace between lines

A more normal way to do this is to skip the blank lines and then process those lines further.
while (my $line = <$fh_in>) { next if ($line ~ m/^\s*$/); #skip blank lines #more processing of this non-blank line }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found