in reply to add and delete to hash reference
print "$closurehash->{$key}\n";
I think your mistake is to assume that ->{name} is some Perlish magic to tell you the name of something. It isn't - it's a reference to a key called 'name' in a subhash of your $closurehash->{$key}, which doesn't exist because you haven't created it.
|
|---|