(sorry if this is a repost, I sent it before
confirming my subscription)
I'm having a memory problem with Perl in Panther that
I didn't have in Jaguar. When I try to read a large
text file using the line input operator (), I get an
out of memory error:
*** malloc: vm_allocate(size=8421376)
On May 7, 2004, at 2:32 AM, Xavier Broccoli wrote:
The strange thing is that I'm not slurping up the
whole file
The code you posted *does* slurp the whole file.
foreach my $line (FILE1) {
chomp $line;
(do something...)
}
foreach is documented in perlsyn as LABEL foreach VAR (LIST) BLOCK.
I'm having a memory problem with Perl in Panther that
I didn't have in Jaguar. When I try to read a large
text file using the line input operator (), I get an
out of memory error:
*** malloc: vm_allocate(size=8421376) failed (error
code=3)
*** malloc[5576]: error: Can't allocate region
Out of
*** 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