in reply to printing to filehandles
You have to flush your file handle after printing to write to the disk immediately, otherwise it gets conveniently buffered in memory.
The alternative is to close the file after you have finished reading, and open it again next time before writing to it. Keep the time that the file is openned as short as possible.
use FileHandle; ... open OUT, ...; autoflush OUT 1; print OUT ...;
The alternative is to close the file after you have finished reading, and open it again next time before writing to it. Keep the time that the file is openned as short as possible.
|
---|
In Section
Seekers of Perl Wisdom