rogue90 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks - long time listener, first time caller. I have a simple script that outputs simple text to a file. Easy enough. When that file nears 50k, I want to close it and start outputting to a new file. stat won't work because the output is in buffer and not actually written to the file yet. I can't seem to find a solution other than processing the file again after I close it. Any ideas? Happy Friday :) -r90