in reply to Re: Strange memory growth?
in thread Strange memory growth?

I wonder why having the my inside the block would cause it to use more memory than having it outside?

And even without the my, it still uses 28M:

sleep 5; if (1) { $foo = "perl" x 1000000; sleep 5; } if (1) { $foo = "perl" x 1000000; sleep 5; } if (1) { $foo = "perl" x 1000000; sleep 5; } if (1) { $foo = "perl" x 1000000; sleep 5; } if (1) { $foo = "perl" x 1000000; sleep 5; } if (1) { $foo = "perl" x 1000000; sleep 5; }