for my $size (@sizeOfTrees) { my $quant = $tree_collection{$years}{$trees}{$size} || "-"; printf "%9s", "$quant"; # { no warnings; $total += $quant; } # WHY DO I NEED THIS? }