I am trying to figure out how to remove a hash entry that returns a value {}.
{}
I worked with something like this:
if (ref($snapshots{"ID\:$id"}) eq "{}") { print "ID $id hash no snapshots\n"; }
He does not work. Any ideas?
Taking into account {}, refwill "HASH"not"{}"
ref
"HASH"
"{}"
if (ref $snapshots{"ID\:$id"} eq 'HASH' && !scalar keys %{$snapshots{"ID\:$id"}}) { delete $snapshots{"ID\:$id"}; }