in reply to Logical Not and arguments to grep

To override precedence, parens are usually used.

my @ary5 = grep( ( not $hash{$_} ), @array); # OK