Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-08-23 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls