M
myflaneur
Hi:
I have been trying to get my PERL script to flush the output buffer
after each and every print statement. I have tried the following code
snippets-none of which are working.
Any help/pointers will be greatly appreciated.
Thanks.
-------------------------------------------------------
open(OUTPUT,">>my_output.txt");
#within some loop
{
$cfh=select OUTPUT;
$|=1;
print OUTPUT "Some array";
select $cfh;
#$cfh->flush();
#select(( select(OUTPUT), $|=1)[0]);
}
--------------------------------
use IO::Handle;
open(OUTPUT,">>my_output.txt");
#within some loop
{
print OUTPUT "Some array";
#OUTPUT->autoflush(1);
#select(( select(OUTPUT), $|=1)[0]);
}
---------------------------------
I have been trying to get my PERL script to flush the output buffer
after each and every print statement. I have tried the following code
snippets-none of which are working.
Any help/pointers will be greatly appreciated.
Thanks.
-------------------------------------------------------
open(OUTPUT,">>my_output.txt");
#within some loop
{
$cfh=select OUTPUT;
$|=1;
print OUTPUT "Some array";
select $cfh;
#$cfh->flush();
#select(( select(OUTPUT), $|=1)[0]);
}
--------------------------------
use IO::Handle;
open(OUTPUT,">>my_output.txt");
#within some loop
{
print OUTPUT "Some array";
#OUTPUT->autoflush(1);
#select(( select(OUTPUT), $|=1)[0]);
}
---------------------------------