Dear All, I have trouble with embedding Perl in C. I would like to replace some subroutine (exactly it is print function) in Perl script without changing this script.
#include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; // Perl interpreter in my program int main(int argc, char **argv) { char* command_line[] = {"", “./script.pl”}; // script.pl is perl script my_perl = perl_alloc(); perl_construct(my_perl); //maybe, in this place I should carry out some function to replace print? perl_parse(my_perl, NULL, 3, command_line, (char **)NULL); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl); return 0; } Is it possible? And how can I do it? Where can I find information about this subject? Or how I can replace any perl function? I was looking for any information dealing with my problem, but I haven’t found anything yet. Any help is much appreciated. Thanks & Regards in advance Ivan Gromov -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/