thanks so much for your help. I will check it out.
I have been progaming for a long time in fortran, PL/M, c, c++,perl but there is always more to learn, great!

I should try this under windows instead of linux and see what happens.
Thanks Eitan.

I have also downloaded the Expect modules and check that out.
Cheers,
   Rob Key

On 13/05/2010 22:44, Eitan Adler wrote:
The C programme looks like this (very simple)
#include<stdio.h>
int main()
{
        int i;
        char s[20] = "hello from c";
        for (i = 0; i<  15; i++) {
                sleep(1);
                printf("%s %d\n", s, i);
        }
        return 0;
}
and yet I only get the output to perl when it is finished and died.
Thanks,

You get multiple levels of output buffering:
1) C does its own output buffering. Take a look at man setvbuf(1)
2) The operating system buffer which is entirely different than the C buffer
You need to disable both of them to get fully unbuffered output


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to