http://www.perlmonks.org?node_id=1006924


in reply to Java programming and Perl

It's possible to call Java code from Perl using Inline::Java. An example module that does so is XML::Saxon::XSLT2.

There are similar inline modules for other programming languages - Inline::C, Inline::Ruby, Inline::Lua, etc.

The other way around - calling Perl from other programming languages - is also possible. Perl can be compiled as a library ("libperl") which can be embedded into C programs; and thus theoretically be called from any other programming language capable of linking against C libraries. There exists a PECL module allowing Perl to be embedded in PHP.

I don't think this would be a fruitful or indeed sane way of getting Perl running on Android though. Maybe look at perldroid?

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'