Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 chilling in the Monastery: (11)
As of 2014-11-27 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (182 votes), past polls