Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
We don't bite newbies here... much
 
PerlMonks  

Re: Strange bevahiour of grep function.

by LanX (Abbot)
on May 14, 2013 at 15:57 UTC ( #1033514=note: print w/ replies, xml ) Need Help??


in reply to Strange bevahiour of grep function.

Hard to read, but if you want to invert a logical clause you also have to switch and to or and invert all sub-clauses.

see De_Morgan's_laws

And consider to use List::MoreUtils 'any' instead of grep.

HTH =)

Cheers Rolf

( addicted to the Perl Programming Language)

update

s/ List::Util / List::MoreUtils /


Comment on Re: Strange bevahiour of grep function.
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033514]
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: (10)
As of 2014-04-21 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (494 votes), past polls