Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by ccn (Vicar)
on Dec 26, 2013 at 13:11 UTC ( #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
Node Status?
node history
Node Type: note [id://1068433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2020-05-29 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (167 votes). Check out past polls.

    Notices?