http://qs1969.pair.com?node_id=1187877


in reply to Re^2: determine the variable causing the error: Use of uninitialized value
in thread determine the variable causing the error: Use of uninitialized value

OK I was able to reproduce (some of) your problems in 5.14 ... that's indeed pretty inconsistent.

As a first step we should check if newer versions still have these problems.

use strict; use warnings; warn "version $]"; my %hash=(a=>undef,b=>[]); my $h=\%hash; my @array=({a=>undef}); my $a=\@array; warn "hash $hash{a}"; warn "hoa $hash{b}[0]"; warn "hashref $h->{a}"; warn "hoa ref $h->{b}[0]"; warn "array $array[1] "; warn "aoh $array[0]{a} "; warn "array ref $a->[1] "; warn "aoh ref $a->[0]{a} ";

version 5.014002 at /home/lanx/pm/warn_undef.pl line 4. Use of uninitialized value $hash{"a"} in concatenation (.) or string a +t /home/lanx/pm/warn_undef.pl line 13. hash at /home/lanx/pm/warn_undef.pl line 13. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 14. hoa at /home/lanx/pm/warn_undef.pl line 14. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 16. hashref at /home/lanx/pm/warn_undef.pl line 16. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 17. hoa ref at /home/lanx/pm/warn_undef.pl line 17. Use of uninitialized value $array[1] in concatenation (.) or string at + /home/lanx/pm/warn_undef.pl line 19. array at /home/lanx/pm/warn_undef.pl line 19. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 20. aoh at /home/lanx/pm/warn_undef.pl line 20. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 22. array ref at /home/lanx/pm/warn_undef.pl line 22. Use of uninitialized value in concatenation (.) or string at /home/lan +x/pm/warn_undef.pl line 23. aoh ref at /home/lanx/pm/warn_undef.pl line 23.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!