in reply to Re^4: Doubts of a perl beginner on PERLEMBED
in thread Doubts of a perl beginner on PERLEMBED
The best way to do it is probably to make sure all your Perl code is in subroutines (so running the script from the command-line) doesn't actually do anything), and that you don't have any name clashes between the two files. (Use separate packages if necessary.)
Then load both the files in, by parsing (perl_parse) and executing (perl_run) a one-liner that requires them both, as I indicated earlier. Once you've done that, you can call your subs using one of the call_* functions described in perlcall.
Good luck! Embedding perl is a pretty “advanced” topic for a self-described perl beginner. Good for you for not being afraid to try! But don't expect it to be particularly easy or clearly documented...
|
---|