in reply to Tip on better performance: Open and close output file or leave it open?
Consider, STDOUT/STDERR, they're almost always open for you, but you rarely open/close STDOUT/STDERR frequently from a program -- how does your usage compare?
Consider flock/File::Lockfile, could some other program read/update the file you're printing to? Maybe you want to open a tempfile() which you rename to final filename when you're done with the file?
|
|---|