Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Strange bevahiour of grep function.

by LanX (Canon)
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 wandering the Monastery: (17)
As of 2015-07-06 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls