my %hash = (one => 1, two => 2, three => 3); my @keys = qw(four five six); my @slice = @hash{@keys};