in reply to One liner to Check and undef hash elements

# 1.) scalar grep defined, values %$hash; # 2.) undef $_ for values %$hash;
At 2.), I interpreted your question as in just emptying all slots, without removing their keys.

Makeshifts last the longest.