Inconsistency of 'Use of uninitialized value in scalar assignment' warningby ccn (Vicar)
|on Dec 26, 2013 at 07:38 UTC||Need Help??|
ccn has asked for the wisdom of the Perl Monks concerning the following question:
there are two subroutine calls in the script below.
Output I have is the following:
Use of uninitialized value $baz in hash element at t.pl line 10. Use of uninitialized value in scalar assignment at t.pl line 2.
The question is: Why perl generates 'Use of uninitialized value in scalar assignment' only for the second call of foo and not for the both calls? What's the difference?
In both cases @_ in foo contains an alias of not existing value of not existing key of %bar, you know.