{ my $huge = huge_data_structure(); sub uncalled_sub { # state $huge = huge_data_structure(); return; } } print 'mem usage: ', my_mem(), "\n"; __END__ mem usage: 116132