Otherwise (ab)using hashes for set operations like intersections would be trivial.
Though off-topic here: Is there a common idiom for an intersection of two hash-sets? The first thing that comes to my mind is something like:
%a_b = map {exists $b{$_} ? ($_ => $b{$_}) : ()} keys %a;
Greetings,
-jo
In reply to Re^2: Consise way to filter out keys with undef values from a hash slice?
by jo37
in thread Consise way to filter out keys with undef values from a hash slice?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |