Hello,
I would like to add a script into my C program (just embed it) and execute it through libperl. How can I do that? Simple eval has limitations on IO operations, etc. So it does not fit.
It's necessary to keep a script in the same binary (not in separate file).
I mean this:
# here should be something to load the script into the interpreter. So this is the question...const char script[] = "Here is my big script with function 'exec_it()'"; static PerlInterpreter *my_perl; my_perl = perl_alloc(); perl_construct(my_perl);
perl_call_pv("exec_it", G_DISCARD);
In reply to Embedding perl script into C program by darkdiver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |