Oh, you are so right.  I guess Panther is just
stingier with its memory, and I never got bitten by
this before!

Thanks!!

XB

--- Jarkko Hietaniemi <[EMAIL PROTECTED]> wrote:
> > *** malloc: vm_allocate(size=8421376) failed
> (error
> > code=3)
> > *** malloc[5576]: error: Can't allocate region
> > Out of memory!
> > 
> > The strange thing is that I'm not slurping up the
> > whole file,
> 
> Oh but you are...
> 
> > I'm reading it line by line.  But Perl
> > seems to be slurping the whole thing into memory
> > before even processing the first line. But even
> so,
> 
> > foreach my $line (<FILE1>) {
> 
> This reads in the whole file first because the (...)
> of
> for each enforces list context, and the <FH> in list
> context
> does read in the whole handle.  You meant
> 
> while (my $line = <FILE1>) {
>     my $line = $_;
> 
> or something similar.
> 
> 


        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

Reply via email to