@new_hashes = map{ my $x = $_; +{ map { $_=>$x->{$_} } @wanted_keys } } @old_hashes;