##
$VAR1 = {
'key' => undef
};
####
$VAR1 = {};
####
# ...
my %h;
# ...
my @local_keys = qw/foo bar baz/;
my @inexistent = grep {! exists $h{$_}} @local_keys;
{
local @h{@local_keys};
# ...
}
delete @h{@inexistent};
# ...