Here is the idea for an algorithm for that:
- count all keys into a new hash
- Delete all those entries from the new hash where the count is equal to the number of "eltX" elements
- What remains in the new hash are the keys that are to be delete
$\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print