#!/usr/bin/perl use strict; use warnings; use Perl6::Junction qw/none/; use Data::Dumper; my %colors = ( red => '#ff0000', blue => '#0000ff', green => '#00ff00', yellow => '#ffff00', ); my @sel_col = qw/ red green /; print Dumper [grep {none(@sel_col) eq $_} keys %colors];