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


in reply to Devel::Size reports different size after hash access

You store a number then access it as a string so Perl caches the stringised version of the number along with the number. Try quoting the value so it's stored as a string instead of as a number to check (works for me - size is stable).

Premature optimization is the root of all job security
  • Comment on Re: Devel::Size reports different size after hash access