use Devel::Size;; push @a, [(undef)x9] for 1 .. 7022790;; print Devel::Size::size( \@a );; 33554472 #### my @my_arr; $#my_arr = 7022790; ...