in reply to Re^4: perl c++ perlembed question
in thread perl c++ perlembed question
that also does not call a function from the c++ code from within the power.pl script
That's correct - sub expo is simply being passed values that come from the C code (subs foo and bar).
foo.pl runs and executes bla() from the c++ script and gets some return value from the bla() func
That's the tricky bit ... well, "impossible" rather than "tricky", one suspects. I don't know how foo.pl could run bla() directly.
I also don't know why foo.pl would *need* to run bla() directly, given that bla()'s return value could be passed to foo.pl as an argument (as per the power.pl example already supplied). If the need to have foo.pl call bla() is a non-negotiable requirement, then I can't help at all with that aspect.
UPDATE: I now think I *can* envisage circumstances where it would be nice if foo.pl could call bla() directly - but I still have no idea how that could be achieved.
Thanks for an interesting question, btw. (I learned something in trying to answer it.)
Cheers,
Rob