Working with very large text files



Hi,
I'm working on a server which writes text to large log files. The
problem is that these files are 1 GB and when I open them with perl,
perl tries to load the entire file into the memory and fails when XP is
out of memory.

I only need to use the text written in the last 5 minutes, which
shouldn't take more then a couple of megs, but since I'm using XP, I
can't use `tail`.

What code doesn't make perl load the entire file into the memory?

.



Relevant Pages

  • Re: Working with very large text files
    ... > I'm working on a server which writes text to large log files. ... > perl tries to load the entire file into the memory and fails when XP is ...
    (perl.beginners)
  • Memory leak, DBI 1.55 + DBD::ODBC 1.13 + MS SQL 2000
    ... Recently I have bumped into a memory leak happening in DBI. ... My Perl build config: ... ActivePerl Build 819 ... 28671 Define PERL_NO_DEV_RANDOM on Windows ...
    (perl.dbi.users)
  • Re: why the perl docs suck
    ... allocate new memory, copy then free old? ... Perl getting to that complex computation. ... >> the granularity of a Perl push statment. ... >> you don't know that memory allocation is not contiguous! ...
    (comp.lang.perl.misc)
  • Re: Multiple "MY" Same Variable - Release Bytes?
    ... Perl do not truly release more memory ... > bytes but rather make that malloc (memory allotment) available for ... arenas, ...
    (comp.lang.perl.misc)
  • Re: Zero Rreferences (was:Stupid Question)
    ... > drieux wrote: ... > like its not just on NT that programs retain their memory allocations. ... Think about what happens when you Perl Extension ... Folks need to remember that 'best practice' ...
    (perl.beginners)