Put one line at the starting
$|=1;
Actually it can be any value other than 0.
Regards
Nishanth
--- Chas Owens <[EMAIL PROTECTED]> wrote:
> On 3/13/06, Tommy Grav <[EMAIL PROTECTED]> wrote:
> > I am writing some output to a file using printf.
> However this output
> > is buffered.
> > How do I g
>select FH;
>$| = 1;
>select STDOUT;
There is not any problem here.While I find a more simple statement insteadly:
select ( (select FH, $|=1)[0] );
It based on the fact that 'select' should return the previous file-handle
relative to the selected file-handle.
--
Jeff Pang
NetEase AntiSpam Te
On 3/13/06, Tommy Grav <[EMAIL PROTECTED]> wrote:
> I am writing some output to a file using printf. However this output
> is buffered.
> How do I get unbuffered output to a file.
>
> Cheers
> Tommy
>
>
> [EMAIL PROTECTED]
> http://homepage.mac.com/tgrav/
>
> "Any intelligent fool can make things b
I am writing some output to a file using printf. However this output
is buffered.
How do I get unbuffered output to a file.
Cheers
Tommy
[EMAIL PROTECTED]
http://homepage.mac.com/tgrav/
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genius -
On 3/13/06, Tommy Grav <[EMAIL PROTECTED]> wrote:
> How do I get unbuffered output to a file.
It's Perl's secret $| variable. It's in the perlvar manpage, and maybe
also check out the one-argument select() in perlfunc. Cheers!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [E
On Oct 29, Kingsbury, Michael said:
>open ( LOG, "/tmp/log");
>autoflush LOG 1;
>print LOG `/path/to/2hour/process`;
>close (LOG);
>
>This doesn't generate the expected results, ie, I don't get any output until
>the end.
That's because `...` doesn't return any input until the process
finishes.
I'm running a command similar to the following:
open ( LOG, "/tmp/log");
autoflush LOG 1;
print LOG `/path/to/2hour/process`;
close (LOG);
This doesn't generate the expected results, ie, I don't get any output until
the end.
Any ideas on how to get the output part way through? Splitt