Hash表之间键比较

Hash表之间键比较

let's say I have two hash tables: new, old

How to find out the keys in new, but not in old?
How to find out the keys in old, but not in new?

tell me the quickest way.

Thanks.
use List::MoreUtils;
my %ha = (a => 1, b => 2, c => 3);
my %hb = (a => 4, d => 5, e => 6);

### keys in ha but not in hb ###
my @list = grep {! exists $hb{$_}} keys %ha;
print @list;