my @root = (1022, 2); #### $verbose and warn "found " . @root . " root nodes: " . join(" ", grep { defined } @root[0 .. 7]); #### Use of uninitialized value in hash element at ./rock-cut line 163. Can't use an undefined value as an ARRAY reference at ./rock-cut line 171. #### $verbose and warn "found " . @root . " root nodes: " . join(" ", @root[0 .. (@root < 8 ? @root : 8) - 1]); #### grep { defined } @root[0 .. 7] #### #!perl use warnings; no warnings "uninitialized"; use Dumpvalue; $D = Dumpvalue->new; sub f { print $_[0]; } sub g { $_[0] = 5; } f($a[1]); f(@a[2, 3]); g($a[5]); g(@a[6, 7]); print $a[9]; print @a[10, 11]; () = grep 0, $a[13]; () = grep 0, @a[14, 15]; $t = $a[17]; @t = @a[18, 19]; f($h{1}); f(@h{2, 3}); g($h{5}); g(@h{6, 7}); print $h{9}; print $h{10, 11}; () = grep 0, $h{13}; () = grep 0, @h{14, 15}; $t = $h{17}; @t = @h{18, 19}; $D->dumpValues(\@a, \%h); __END__ #### 0 ARRAY(0x81495c0) 0 empty slot 1 empty slot 2 undef 3 undef 4 empty slot 5 5 6 5 7 undef 8 empty slot 9 empty slot 10 empty slot 11 empty slot 12 empty slot 13 undef 14 undef 15 undef 1 HASH(0x8192464) 13 => undef 14 => undef 15 => undef 2 => undef 3 => undef 5 => 5 6 => 5 7 => undef