PDA

View Full Version : Standalone Perl on Android



Anant Shrivastava
03-24-2012, 02:47 AM
In simmilar lines to standalone python (http://www.garage4hackers.com/f54/android-standalone-python-scripts-1323.html) this is the code that could be used for running standalone perl applications.

This script again tries to address some very basic issues.
1) non availability of direct perl calling mechanism while using terminal emulator.
2) Environmental limitations.
3) you canít pass command-line arguments.

Script enclosed Here



PW=`pwd`

cd $PW

export PERL5LIB="/sdcard/haxdroid/perllib"

/data/data/com.googlecode.perlforandroid/files/perl/perl "$@"




this script allows for following things

1) allow us to use this shell script to call perl directly.
2) allows for command line argument passing.
3) relative path references are now working

I have named this script as py and placed it in /system/bin/pl location
so basically copying this script in a text file say pl.txt
adb push pl.txt /system/bin/pl
adb shell chmod 04755 /system/bin/pl

As always this depends on perl4aandroid project for running properly, you can download from here

https://android-scripting.googlecode.com/files/perl_for_android_r1.apk


Original Posting on : Standalone Perl on Android | Anant Shrivastava : Techno Enthusiast (http://blog.anantshri.info/standalone-perl-on-android/)

neo
03-27-2012, 01:11 PM
Nice information Anant, though perl is not my Cup of Java ;-)

neo
03-27-2012, 01:12 PM
Nice information Anant, though perl is not my Cup of Java ;-)

P.S. If somone thinking I code in Java due to this line they are WRONG in that thinking .... Hahaha I like Python