my @new_hashes = map { my %h; @h{@wanted} = @{$_}{@wanted}; \%h } @old_hashes;