http://www.perlmonks.org?node_id=1214896


in reply to '%hash = ()' is slower than 'undef %hash'

G'day rsFalse,

"What is your opinion?"

Unfortunately, you've provided very little information upon which an opinion might be based. Answers to the following would have been useful in your OP.

Given all those unknowns, my opinion is that you should consider code like this:

{ my %hash = (...); # operations on %hash here } # %hash doesn't exist here. Does that solve your problem?

Of course, with some answers to those questions, a better response might be forthcoming.

— Ken