use Devel::Size 'total_size'; my %struct = ("key1" => ["bill","ben"], "key2" => ["dave","jen"]); print "total size of %struct - ", total_size(\%struct); __output__ total size of %struct - 412