my %hash = ('a' => undef, 'b' => undef, 'c' => undef, 'd' => undef); if (exists $hash{'a'}) { # yadda yadda } #### my %hash; @hash{'a', 'b', 'c', 'd'} = ();