use strict;
use warnings;

my %hash = (
    one => 1,
    two => 2,
    four => 4,
);

my @required_keys = qw(two three four);
my %result_hash = map { $_ => $hash{$_} if (exists $hash{$_}) } @required_keys;

use Data::Dumper;
print 'Resulting hash: ' . Dumper(\%result_hash);
