On Wed, Feb 07, 2001 at 01:22:18PM -0500, Jim Correia wrote:
> 
> In particular, I want to nuke a program in mid-execution and have perl
> clean up as best as it can at this point, which includes flushing the
> buffers of any open files.

The easiest solution is to just turn on autoflush when the file is opened.

use IO::File;           # get access to filehandle methods

open(OUTPUT, ">out") or die "Can't open 'out': $!\n";

OUTPUT->autoflush(1);   # equivalent to setting $| = 1 for OUTPUT


Ronald

Reply via email to