$ perl -le' my @a; print 0+@a; print defined($a[0]) || 0; $a[70] = "a"; print 0+@a; print defined($a[0]) || 0; ' 0 0 elements in the array 0 and the first one isn't defined. 71 71 elements in the array 0 and the first one still isn't defined. #### $ perl -le' my @a; print defined($a[0]) || 0; $a[0][0]; print defined($a[0]) || 0; ' 0 1