Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Inconsistency of 'Use of uninitialized value in scalar assignment' warning

by ccn (Vicar)
on Dec 26, 2013 at 13:11 UTC ( [id://1068433]=note: print w/replies, xml ) Need Help??


in reply to Re: Inconsistency of 'Use of uninitialized value in scalar assignment' warning
in thread Inconsistency of 'Use of uninitialized value in scalar assignment' warning

The difference between two foo call cases is evaluation of undefined $baz variable. Isn't it? So we got first warning.

But why we got the second warning? In both cases proxy object must be created and be evaluated during the assignment the same way, and must produce the same warnings.

Replies are listed 'Best First'.
Re^3: Inconsistency of 'Use of uninitialized value in scalar assignment' warning
by dave_the_m (Monsignor) on Dec 26, 2013 at 18:54 UTC
    I think people are still thinking that the second undef warning is due the hash *value* not existing; its not. Both warnings are being generated by trying to evaluate the *key*. In the first foo() call in the OP, the key isn't undef, so it doesn't generate any warnings.

    Dave.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-19 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found