use Apache::Leak; my $global = "FooA"; leak_test { $$global = 1; ++$global; };