in reply to Strange bevahiour of grep function.
see De_Morgan's_laws
And consider to use List::MoreUtils 'any' instead of grep.
HTH =)
Cheers Rolf
( addicted to the Perl Programming Language)
s/ List::Util / List::MoreUtils /