Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Termux for all your Perl-needs on Android

by morgon (Priest)
on Mar 25, 2018 at 23:29 UTC ( #1211709=perlmeditation: print w/replies, xml ) Need Help??


I don't know how well known this is (it's probably quite old new for you) but recently I had the problem of wanting to run a Perl-script on a non-rooted Android-tablet and came across the fabulous Termux-project.

Installing this app gives you a terminal-environment and with a simple

pkg install perl

you get a working 5.26.1 perl. Now add

pkg install make pgk install clang

and voila you have a fully functional cpan-client that allows you to install even xs-modules.

Really nice...

Replies are listed 'Best First'.
Re: Termux for all your Perl-needs on Android
by Corion (Pope) on Mar 26, 2018 at 07:20 UTC

    Also very nice is that Termux comes with some command line utilities to query and set the state of Android functions and also to read and send SMS. This gives you a nice way to interact with Android from a Perl script without needing a module to talk to the Android API.

    All that's missing is a small wrapper module, maybe Android::Termux::API?

      The Termux-app together with the Termux:API-app gives you that.

      And it's not only texting ("SMS" to the germans).

      It e.g. also gives you access to the speech-synthesis that is (on my Fire 7) surprisingly good.

      Didn't you once explain something like that Androids file system is problematic when installing Perl modules?

      Was that a different approach?

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Wikisyntax for the Monastery

        No, it is the same approach. Termux offers you to install some symlinks so you can have $HOME on a common directory, like the Downloads directory or something. But if you stay within Termux, you can only ever get access to files saved from within Termux, as Android basically runs every app as its own user. If you have root, you can still access other files.

Re: Termux for all your Perl-needs on Android
by morgon (Priest) on Mar 26, 2018 at 11:37 UTC
Re: Termux for all your Perl-needs on Android
by zentara (Archbishop) on Mar 26, 2018 at 15:01 UTC
    I've been lurking under a rock for quite some time, but this announcement got me to login and upvote. Great work! ++++

    I'm not really a human, but I play one on earth. ..... an animated JAPH
Re: Termux for all your Perl-needs on Android
by marto (Cardinal) on Mar 26, 2018 at 09:35 UTC

    Thanks, I need to check this out. I'd previously used CC Tools, but that was some time ago.

Re: Termux for all your Perl-needs on Android
by Anonymous Monk on Feb 26, 2019 at 14:37 UTC
    Termux worked great for me on Android 7.0 in Feb 2019. This also helped:
    pkg install perl pkg install make pkg install clang pkg install curl pkg install wget pkg install lftp pkg upgrade termux-setup-storage cpan cpan install HTTP::TINY cpan install (your other perl reference libraries here)
Re: Termux for all your Perl-needs on Android
by Anonymous Monk on Dec 27, 2019 at 13:41 UTC
    in the beginning of your (nice) post..

    "pkg install perl
    pkg install makeď
    are ok..

    " pgk install clang"
    seemed to be.. a little bit wrong and not so hard to fix by a little permutation of a 'k' and a 'g'..


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1211709]
Approved by kcott
Front-paged by 1nickt
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2020-10-28 12:15 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (260 votes). Check out past polls.