The comma operator has a higher precedence than the not operator. The list of two expressions (the hash element and the array) has to be evaluated before not can be evaluated; that's the source of the void context warning.
I almost always use map with a block so I never have to think about this sort of thing.
Improve your skills with Modern Perl: the free book.
In reply to Re: Logical Not and arguments to grep
by chromatic
in thread Logical Not and arguments to grep
by tangent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |