in reply to Re: Removing lines from files
in thread Removing lines from files
Besides, the file is updated after every shift operation which means you'd be re-writing the file four times (!)sub SHIFT { my $self = shift; scalar $self->SPLICE(0, 1); }
I don't think Tie::File is the right approach to manipulate 700 MB log files.
Update: I have a feeling the OP is running into out of memory problems because Tie::File is keeping track of the start of each line even though it doesn't need to. For a multi-megabyte file this clearly would be a problem. However, this is currently just a conjecture.
|
|---|