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

cajun2019 has asked for the wisdom of the Perl Monks concerning the following question:

Apparently (undef)[0] is being interpreted as a null list. In the context of the other statements, why is that? Thanks...
%tmp= (nothing => undef, one => 1); # $tmp{nothing} is undef %tmp= (nothing => (0, undef)[0], one => 1); # $tmp{nothing} == 0 %tmp= (nothing => [undef, 0]->[0], one => 1); # $tmp{nothing} is undef %tmp= (nothing => scalar ((0, undef)[1]), one => 1); # $tmp{nothing} is undef %tmp= (nothing => (undef), one => 1); # $tmp{nothing} is undef %tmp= (nothing => (undef)[0], one => 1); # $tmp{nothing} eq 'one'*** Why not undef? %tmp= (nothing => (undef, 0)[0], one => 1); # $tmp{nothing} eq 'one'*** Why not undef? 1;