# grep out hash entries whose key *or* value is 'moo'... %cow = map { any($^key,$^val) eq 'moo' ?? $^key => $^val :: () } %animals;