sub one { my $large_struct = get_1MB_from($dbh); do_stuff_on(\$large_struct); } sub two { my $other_struct = get_1MB_from($dbh).get_1MB_from($dbh2); do_stuff_on(\$other_struct); } one; two;