use warnings; use strict; use Inline C => Config => INC => '-IC:/_32/C', LIBS => '-LC:/_32/C -lmylib', BUILD_NOISY => 1; use Inline C => <<'EOC'; #include void foo(FILE * x) { my_puts(x); fflush(x); } EOC $| = 1; for(1 .. 2) { foo(*stdout); print "\nhello from perl\n"; } for(1 .. 2) { foo(*stderr); print "\nhello from perl\n"; }