|laziness, impatience, and hubris|
Java programming and Perlby heatblazer (Scribe)
|on Dec 03, 2012 at 18:28 UTC||Need Help??|
heatblazer has asked for the
wisdom of the Perl Monks concerning the following question:
I `ve heard rumors that Perl can be glued to other programming languages such as C++. I am interested how can this be done in Java, so I can use some tools from Perl I can`t normally use from Java, also, can I pack it into the jar file, so, let`s say, I can use a java program with Perl bindings on Android device?
I`d really appreciate some small examples and explanations.
Here is an example in Java with it`s defaults scripting engine(JS).
Updated Passing a .js script file will result in executing it, also the js can interact with the program if programmed. Perl has Java modules from CPan, in Java cookbook by F.Darwin there is a topic: "Marrying Perl and Java" which gives a partial answer to my desire, but - it`s going from Perl, I need something as above code but with perls scripts so like I can program my java app with a small perl scirpt, let`s say perl script will search for files, java will read and execute them.(Just example, I won`t do exactly this).
I wonder if it can be done with Perl?