At 03:39 PM 1/29/02 -0500, [EMAIL PROTECTED] wrote:
>Friends,
>
>How can we can programatically control the flushing out of an output buffer
>so that during an iterative process, the contents can be periodically
>flushed out to the output buffer?
>
>Say, in this test snippet code, what should I do in order to flush the
>contents for every 10th record?
>- Rex
>
>##########################
>#!/usr/bin/perl
>use strict;
>my($testFile) = ">test.txt";
>open(OUT, $testFile);
>
>for (0..100) {
> print OUT $_,"\n";
> #if(not $_ % 10 ){
> # print "flush\n";
> #}
>}
>close(OUT);
>
>##########################
If you
use IO::Handle;
then you can just say
flush OUT;
whenever you like.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]