my @unwanted = qw( schema log ); #### my %unwanted = map { $_ => 1 } @unwanted; my @wanted = grep !$unwanted{ $_ }, keys %hash; my %subhash = %hash{ @wanted }; do_something( \%sub_hash ); #### my %subhash = %hash; delete @subhash{ @unwanted }; do_something( \%sub_hash ); #### delete local @hash{ @unwanted }; do_something( \%hash );