14 - Devel::Size Returns the memory usage of a data structure use Devel::Size qw(total_size); opendir DIR, "." or die "Couldn't open the current directory"; push @files, $_ while (readdir DIR); closedir DIR; print "There are ".@files." files in your current dir\n"; print "Storing this array took up ".total_size(\@files)." bytes\n"; $ perl size.pl There are 217 files in your current dir Storing this array took up 3664 bytes