my @valid = qw( this that another ); $broken->{$_} = 0 for @valid; $broken->{$_} = 1 for @list;