in reply to Doubts of a perl beginner on PERLEMBED
(3) My third question is ---I have to call 2 different perl subroutines in 2 different perl files from a C file. So i want to know whether i will to have initialize 2 seperate occurances of "PerlInterpreter" . If it is possible to use same "PerlInterpreter" for calling 2 different perl files ,could you please specify how.Is there any reason you can't just combine the two files into one?
You can probably load both files into the same perl interpreter using require. So something like
might well work for you. (Of course it will cause problems if both files use the same subroutine name.)char *my_args = { "perl", "-e", "require 'file1.pl'; require 'file +2.pl'" }; ... perl_parse(my_perl, NULL, 3, my_args, (char **)NULL);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Doubts of a perl beginner on PERLEMBED
by jithoosin (Scribe) on Dec 17, 2005 at 09:48 UTC | |
by robin (Chaplain) on Dec 17, 2005 at 11:00 UTC | |
by jithoosin (Scribe) on Dec 17, 2005 at 11:40 UTC | |
by robin (Chaplain) on Dec 17, 2005 at 15:25 UTC | |
Re^2: Doubts of a perl beginner on PERLEMBED
by jithoosin (Scribe) on Dec 19, 2005 at 06:10 UTC | |
by robin (Chaplain) on Dec 19, 2005 at 08:47 UTC |
In Section
Seekers of Perl Wisdom