Trentacle
Junior Poster in Training
72 posts since Dec 2010
Reputation Points: 110
Solved Threads: 20
I know Perl is famous for "batteries included", but C is famous for rolling them little batteries right along, as well. ;)
If you're going to have to re-write it, consider just using C.
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185
Perhaps you should read it more carefully, as there are definitely examples of running Perl code from within C on that page.
That said, it is a bit unusual to call Perl from C and not the other way around. If it's reasonable to do so, another option is to compile your C code into a library and use it from Perl -- of course, this raises some more compatibility issues.
I think you can also compile Perl code into to a native library by linking it with the Perl interpreter somehow, then use that library directly... but I don't know the process.
The "simple way" is to call upon the Perl interpreter directly to do the hard stuff. Since you wish to avoid that approach, everything else is going to be quite a bit more involved.
Trentacle
Junior Poster in Training
72 posts since Dec 2010
Reputation Points: 110
Solved Threads: 20