my @array = qw /a b c/; my %hash = map {$_ => 1} @array; return \%hash;