in reply to Re: Consise way to filter out keys with undef values from a hash slice?
in thread Consise way to filter out keys with undef values from a hash slice?

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

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
  • Comment on Re^2: Consise way to filter out keys with undef values from a hash slice?
  • Download Code

Replies are listed 'Best First'.
Re^3: Consise way to filter out keys with undef values from a hash slice?
by LanX (Saint) on Jun 02, 2020 at 22:54 UTC