On Thu, 7 Feb 2002, Brian Hayes wrote:

> > You should be using something like
> >
> > open(FILE, $file) or die "$!\n";
> > while(<FILE>){
> >     ## do something
> >     }
> > close FILE;
> > __END__
>
> This is what I am doing, but before any of the file is processed, the
> whole text file is moved into memory.  The only solution I can think of
> is to break apart the text file and read thru each smaller part...but I
> would like to avoid this.  I was hoping someone knew how perl interacts
> with memory and knew how to trick it into not reading the whole file at
> one time.

Can you show the code you have?  The entire file shouldn't be loading into
memory before you start reading it line by line, should it?

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Hors d'oeuvres -- a ham sandwich cut into forty pieces.
                -- Jack Benny


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to