Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to eliminate warning message on hash value?

by flexvault (Monsignor)
on Dec 08, 2011 at 13:38 UTC ( [id://942429]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://942429]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found