How to find the perl version in MacOS

Perl is short for Practical Extraction and Report Language and provides a widely recognized web and interface development framework.

To find out if perl is installed on your system, in the command line, you can enter:

$ perl

If there is no error and the mouse pointer keeps blinking, then it means a version of perl is indeed installed on your system.

Version

To find out what version of perl is installed, you need to run the perl with the version flag v:

$ perl -v

The following sample output will be generated in the mac terminal once the above command is run:

Terminal 1
Terminal
Loading...

Installation

If you would like to install perl on your macOS device altogether, then you need to perform the following two steps:

  • Download and install the “Command Line Tools for Xcode”.This can either be downloaded using Xcode or downloaded from the official Apple Developer downloads website here.

  • Once you have the Xcode tool kit installed, you need to run the following command in the terminal:

$ curl -L http://xrl.us/installperlosx | bash

To know about the details of Perl’s installation and setup, you may refer to the official documentation for Perl in macOS.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved