#include #include char* prog = "\ #! perl\n\ use strict;\n\ $\\ = qq[\\n]; \n\ $|=1;\n\ print qq[hello world];\n\ print for 1 .. 10;\n\ "; char* cmd = "/perl/bin/perl.exe"; int main( void ) { FILE* pipe; if( !( pipe = _popen( cmd, "wt" ) ) ) { fprintf( stderr, "Failed to create pipe\n" ); exit( -1 ); } fprintf( pipe, prog ); close( pipe ); flushall(); return 0; }