Re: quicky perl question


Subject: Re: quicky perl question
From: Matthew Schumacher (schu@schu.net)
Date: Mon Nov 12 2001 - 15:18:23 AKST


Michael,

Thanks for the reply...guess you learn something everyday...

Perhaps you can suggest a better way to do what I am going. I want to
open a log file and look for something in it then close it. The log
file is 20MB in size. Is there anyway to do this without the perl
program eating up 20+ MB of memory.

Here is the syntax I am currently using:

foreach $line (reverse <LOGFILE>){
}

Thanks,

schu

Michael Fowler wrote:

> On Mon, Nov 12, 2001 at 11:42:33AM -0900, Matthew Schumacher wrote:
>
>>So the question is, how to I kill my array so that the memory is
>>recovered by the system?
>>
>
> You can't, at least on most versions of Unix. A process cannot return
> memory to the system until the process dies, it can only reuse the memory
> internally. That's what the documentation you were reading was trying to
> tell you.
>
>
> Michael



This archive was generated by hypermail 2a23 : Mon Nov 12 2001 - 15:22:22 AKST