my %hash; my @names = qw(psw numm); @hash{@names} = ('?') x scalar(@names);