in reply to Assigning values to undef hash reference keys two or more at a time

Here are a couple of techniques you can use:

my %employees = map {$_ => undef} qw(key1 key2 key3); @employees{qw(key1 key2 key3)} = undef;

Perl reduces RSI - it saves typing
  • Comment on Re: Assigning values to undef hash reference keys two or more at a time
  • Download Code