in reply to Re^3: Splitting a Blocked file in Round Robin into smaller files
in thread Splitting a Blocked file in Round Robin into smaller files
Would the flush happen regardless?
Wrong question. The one you should be asking yourself is: why do you feel the need to to defeat the whole purpose of buffered IO?
Is your hardware so unreliable or your code so flaky?
Beside which your efforts are of limited benefit as every modern OS also buffers files in the system cache anyway.
In the very rare circumstances that you have a real reason to avoid buffered IO, why not just set autoflush on the file handle with IO::Handle::autoflush()
Or do it manually with IO::Handle::flush() within the loop.
Forcing the system to keep opening and closing the files in order to achieve flushing, all for very limited benefit and no good reason, is very silly and hugely expensive.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Splitting a Blocked file in Round Robin into smaller files
by KurtSchwind (Chaplain) on Dec 15, 2015 at 20:33 UTC |