Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: newlines in regular expressions

by Crian (Chaplain)
on Dec 07, 2004 at 10:18 UTC ( #412874=note: print w/ replies, xml ) Need Help??

in reply to newlines in regular expressions

Perhaps it could be useful (in case that these lines are not really empty because they contain whitespace) to use a script like this:

while (<>) { print unless m~^\s*\n$~; }

This is surely not the most elegant solution, but it should do the task.

Comment on Re: newlines in regular expressions
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-11-25 23:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (693 votes), past polls