in reply to Code cleanup; how best to deal with: defined(%hash) is deprecated at...

I agree with davido above. The only thing I would say is that I find myself rarely using my %hash; anymore, preferring my $hashref = {}; instead. It doesn't directly help with the example problem given, but might help elsewhere if you are passing the data around a lot.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.