#!/usr/bin/env perl use strict; use warnings; use Devel::Size qw(total_size); my(@o, @h); print "Total starting size for \@o: ", total_size(\@o), "\n"; print "Total starting size for \@h: ", total_size(\@h), "\n"; for (1..100000) { push @o, bless {}, 'Foo'; } for (1..100000) { push @h, {}; } print "Total ending size for \@o: ", total_size(\@o), "\n"; print "Total ending size for \@h: ", total_size(\@h), "\n";