johngg@aleatico:~$ perl -Mstrict -Mwarnings -MData::Dumper -E 'say q{}; my %hash = ( qw{ a 1 b 2 c 3 d 4 e 5 f 6 } ); print Data::Dumper->Dumpxs( [ \ %hash ], [ qw{ *hash } ] ); my @excl = qw{ b f }; my $rxExcl = do { local $" = q{|}; qr{^@excl$}; }; print Data::Dumper->Dumpxs( [ [ @hash{ @{ [ grep { ! m{$rxExcl} } keys %hash ] } } ] ], [ qw{ *slice } ] );' %hash = ( 'd' => '4', 'b' => '2', 'a' => '1', 'c' => '3', 'e' => '5', 'f' => '6' ); @slice = ( '4', '1', '3', '5' );