in reply to How to create a hash whose values are undef?
You may like:
my %hash = map {$_ => undef} @keys; [download]
or:
my $hashRef = {foo => {map {$_ => undef} @keys}}; [download]
for the nested key hash ref version.