in reply to Where's the leak?

I've added in the $read->close; as such:
if(<$read> =~ /$searchString/g) { ... $read->close; }
and the problem persists... is there a way to convince PERL to not remember the amount of memory the vars use each time?

Replies are listed 'Best First'.
Re: Re: Where's the leak?
by MarkM (Curate) on Dec 23, 2002 at 21:01 UTC
    It isn't that Perl remembers how much memory a variable used as much as it is that Perl spent all that effort allocating it earlier, and isn't about to get rid of it just yet, as there is a high probability, in general, that if a lot of memory is needed once, it will be needed again.