in reply to How to eliminate warning message on hash value?

Update: The original code failed to compile! But by using Marshall's suggestion, if I replace '$$db{User}' with '$db->{User}, it compiles. But I still get the warning message around 2 million calls.

Thank you

"Well done is better than well said." - Benjamin Franklin

  • Comment on Re: How to eliminate warning message on hash value?

Replies are listed 'Best First'.
Re^2: How to eliminate warning message on hash value?
by Marshall (Canon) on Dec 08, 2011 at 14:26 UTC
    Also be aware that there is a difference between checking if a hash value is "defined" vs "exists". It has to "exist" in order to be "defined".
    if ( exists $RSubtree{$curuser}{$$keyptr} ) { $datapos = $RSubtree{$curuser}{$$keyptr}; }
Re^2: How to eliminate warning message on hash value?
by ikegami (Patriarch) on Dec 08, 2011 at 18:37 UTC
    Yes, there is no difference between the two. It's purely a stylistic improvement.