All     Ethical Hacking     Networking     Programming     OSINT

Perl in Termux – Installation & Basic Commands

Perl is a powerful scripting language used for text processing, automation, and system tasks. With Termux, you can install Perl directly on your Android phone and run scripts just like on a Linux system. Below are the installation steps and basic commands to help you start quickly.

Installation

Update your Termux packages:

pkg update && pkg upgrade -y

Install Perl:

pkg install perl -y

Check Perl version:

perl -v

Create a Perl file:

nano test.pl

Add this code:

print "Hello Termux!\n";

Run the file:

perl test.pl

Basic Commands

Run any Perl script:

perl filename.pl

Install CPAN modules:

cpan install Module::Name

Check installed modules:

perldoc perllocal

View documentation for a module:

perldoc Module::Name

Show Perl help:

perldoc perl

Uninstall Perl:

pkg uninstall perl