use Devel::Size qw[ total_size ];; @a = 1 .. 1e6;; print total_size( \@a );; 32000176 @a = ();; print total_size( \@a );; 8000176