in reply to Counting hash of hashes elements

my $defined_x_no_y = grep { defined $_->{x} && !defined $_->{y} } valu +es %hash; my $defined_z = grep { defined $_->{z} } values %hash;

Note that I used defined and not exists, since you said "defined", but you might have meant "exists" ...

--
edan