Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Blow off blank line and lines with messages

by swiftone (Curate)
on Sep 20, 2002 at 15:00 UTC ( #199501=note: print w/ replies, xml ) Need Help??


in reply to Blow off blank line and lines with messages

Your regex only skips lines that have "" messages. If you want to skip blank lines, add  next if $line =~ /^\s*$/;

The chomp will remove the newline of a blankline, but leave the line itself. (You aren't doing anything with any of the lines here, so I'm assuming you're showing simplified code)

Besides, a "blank line" may be one that has spaces in it.


Comment on Re: Blow off blank line and lines with messages
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-08-29 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (286 votes), past polls