$ perl -le 'my(%one,%two);$one{k}=1;$two{k}=2;delete $one{k}, $two{k}; print "one exists" if exists $one{k};print "two exists" if exists $two{k}' two exists