Installing Perl
Most Linux and macOS machines already have Perl, and Windows users can install a free distribution.
In this page:
Installing Perl
Linux and macOS normally ship with Perl already installed, so you can check with perl -v. On Windows you can install Strawberry Perl, which bundles a compiler and common tools. To manage several Perl versions, tools such as perlbrew are popular.
Note:
Run perl -v to see which version is installed before you install anything.
Example: Installing Perl
$ perl -v
This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
$ sudo apt install perl # Debian/Ubuntu
$ brew install perl # macOS with Homebrew
$ \curl -L https://install.perlbrew.pl | bash
$ perlbrew install perl-5.28.1
⚠️ Run this in your own terminal or Node.js environment.
Common Mistakes
- Installing a second Perl without checking whether one already exists
- Confusing perl -v (version) with perl -V (full configuration)
- Editing the system Perl's modules instead of using a separate install for experiments
Chapter Summary
- Check with perl -v
- Linux and macOS usually include Perl
- Strawberry Perl is a common Windows choice
- perlbrew manages several Perl versions
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: