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" ...
In reply to Re: Counting hash of hashes elements
by edan
in thread Counting hash of hashes elements
by albert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |