in reply to Logical Not and arguments to grep
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Logical Not and arguments to grep
by tangent (Parson) on Apr 01, 2012 at 20:50 UTC | |
by chromatic (Archbishop) on Apr 01, 2012 at 21:19 UTC | |
by Marshall (Canon) on Apr 02, 2012 at 01:02 UTC |