DB<1> @hash{'schema','log',a..c, 'schematic', 'blog'}=('s','l',1..3,'circuit','rant') DB<2> x \%hash 0 HASH(0x3da37a8) 'a' => 1 'b' => 2 'blog' => 'rant' 'c' => 3 'log' => 'l' 'schema' => 's' 'schematic' => 'circuit' DB<3> x +{ %hash{grep !/^schema|log$/, keys %hash } } # Note that the ^ only applies to schema, and the $ only applies to log, so it will remove more than you might have meant 0 HASH(0x3f6e6f8) 'a' => 1 'b' => 2 'c' => 3 DB<4> x +{ %hash{grep !/^(schema|log)$/, keys %hash } } # This version has all exclusions fully anchored 0 HASH(0x3f6ed10) 'a' => 1 'b' => 2 'blog' => 'rant' 'c' => 3 'schematic' => 'circuit' DB<5> $exclude1 = sub { my $href = shift; my $excl= join '|', @_; return +{ %$href{ grep !/^$excl$/, keys %$href } } } DB<6> $h_ref = \%hash DB<7> x $h_ref->$exclude1(qw/schema log/) 0 HASH(0x3f73640) 'a' => 1 'b' => 2 'c' => 3 DB<8> x $h_ref->$exclude1(qw/log schema/) 0 HASH(0x3f73988) 'a' => 1 'b' => 2 'blog' => 'rant' 'c' => 3 'schematic' => 'circuit' DB<9> $exclude2 = sub { my $href = shift; my $excl = join '|', @_; return +{ %$href{ grep !/^($excl)$/, keys %$href } } } DB<10> x $h_ref->$exclude2(qw/schema log/) 0 HASH(0x3f73808) 'a' => 1 'b' => 2 'blog' => 'rant' 'c' => 3 'schematic' => 'circuit'