in reply to Re^2: hash refferences
in thread hash refferences

They are completely different. undef %temp empties the variable but still keeps the variable there, while a lexical variable goes out of scope. The undef %temp acts on the values, while leaving the scope acts on the binding of the name to the value.