in reply to Perl memory leak?

No idea what causes it either, but it's clearly a split issue, since @X isn't even needed, although as others point out a my @X fixes it. Warped! (Although come to think of it, not using @X just makes perl use @_, so this may not mean much...)
#!/usr/bin/perl # ## To burn up memory quickly, run this with option "death". $option = shift; if ($option eq "death") { $line = "1::"; } else { $line = "1:"; } my $i=1; while (1) { split(/:/, $line); # this sucks up memory too if you replace that line with # these 2 #@X = split(/:/, $line); #@X = (); if(!($i++%3000000)) { # a good place to break point print "$i\n"; } }

--
Mike