in reply to How to create a hash whose values are undef?

You may like:

my %hash = map {$_ => undef} @keys;

or:

my $hashRef = {foo => {map {$_ => undef} @keys}};

for the nested key hash ref version.


True laziness is hard work