have you tried
Guile?
Anyway, usually there are three ways to run code in another language inside Perl:
- writing an interpreter in Perl: it's a lot of work, and probably going to be very slow but on the other hand you get maximum portability and good integration with Perl.
- running an interpreter (or on the fly compile and run) for the other language and using sockets to communicate with it. It's probably faster than the previous solution although all the data crossing the interface has to be serialized and that can be expensive. Also, you have to take into account special situations like exceptions crossing the interface, sometimes, getting both languages in sync could be difficult.
- finally, if the interpreter for the other language exists as a library, you can write an XS wrapper. Difficulty varies depending on the language and how well designed the library API is, and obviously, you need too know a bit about XS. Then there are complex matters as threads or sharing file descriptors between both languages that can get really tricky.
update: well, I was thinking about languages interpreted or that run on a virtual machine. For languages compiled to run in real processors, the usual way to interface with them is to use some kind of code generator (XS, SWIG or Inline::C for instance).