sub is_valid_list { my $text = shift; #### my @langs = grep {defined} split /[\s,]+/, $text; #### ! grep { ! exists $validLanguages{$_} } @langs; }