my %hash = undef; #### my %hash = ( key => "value", key2 => "value2" ); # OK my %hash = ( "key", "value", "key2", "value2" ); # OK (same) my %hash = ( "key", "value", "key2" ); # WRONG - gives the error you describe my %hash = ( undef ); # WRONG - equivalent to what you were doing! #### undef %hash; %hash = (); # empty list = empty hash