my $buf; for (0..1000) { $buf = 'A' x (1024*1024*100); print "Run $_: Allocated\n"; undef $buf; print "Run $_: Done\n"; }