Those two don't do the same thing: the first line uses the key "undef" since barewords in the $hash{bareword} construct are automatically quoted. The second one uses the string "" as the key, as explained below.
In any case, you're right that anything recieved from keys() can't be undefined.