I can't actually understand why you're trying to read line by line, and then batch process every 3000. Are the data in those 3000 lines in some way correlated? Otherwise, you're not really doing much good - a 'while' loop will do what you want without needing to buffer anything.
while ( my $line = <Input> ) { #do stuff; print output }
It does depend a little though, what some of your loops are doing. But a 'while' based traverse of a file won't read the whole file all at once (unless you deliberately 'make it' do that).
In reply to Re: Processing large files
by Preceptor
in thread Processing large files
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |