my %h; for(qw/foo bar baz quux foo narf bar poit/) { $h{$_} = 1; }