// perlLib.c #include #include EXTERN_C void xs_init (pTHX); PerlInterpreter *my_perl; void myPerlFunc() { char *largv[] = { "", "-f", "hello.pl", NULL }; int largc=3; my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, xs_init, largc, largv, environ); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl); }