in reply to Using map to interlace an array

map may be overkill for this. I'd use hash slices:
my @keynames = (qw/first second third fourth/); my %hash; @hash{@keynames} = ('0') x @keynames;