// code contains the perl code (char *) // errmsg should be filled with the compile erros PerlInterpreter *myPerlCompile; /*** The Perl interpreter ***/ char *largv[] = { "", "-c", "-e", code, NULL }; int largc=4; int errFnd; initPerlInterp(); myPerlCompile = perl_alloc(); perl_construct(myPerlCompile); //PL_exit_flags |= PERL_EXIT_DESTRUCT_END; errFnd=perl_parse(myPerlCompile, xs_init, largc, largv, (char **)NULL); sprintf(errmsg, "%s", SvPV_nolen(ERRSV));