$a{undef} = 1; print defined for keys %a; # Output 1 # This doesn't work either: %a = (undef, 1);