[perl, install, programming, language, configuration, path, windows, environment variables]


What is Perl

Perl is an open programming language frequently used by engineers. The language excels at tasks involving regular expressions, string manipulation, file processing, and automation. It’s often used for tasks like parsing and extracting data from text files, generating reports, and creating dynamic web content. We use Perl for text processing, such as processing tables generated by other statistical foftware.

Installing Perl

Mac and Linux

Perl is already installed on Mac and Linux OS.

Windows

Download Perl for Windows OS.

For Windows users to be able to use Perl from the command prompt, follow the steps below.

Warning

Making Perl available via the PATH settings on Windows

We need to update our PATH settings; these settings are a set of directories that Windows uses to “look up” software to startup.

  • Right-click on Computer.
  • Go to “Properties” and select the tab “Advanced System settings”.
  • Choose “Environment Variables” and select Path from the list of system variables.
  • Choose Edit.
    • Windows 7 and 8 machines: If you chose the default installation directory, copy and paste the following string without spaces at the start or end:

      ;c:\Program Files (x86)\Perl

    • Windows 10 machines:

      • Click New and paste the following string:

      c:\Program Files (x86)\Perl

      • Click on OK as often as needed.

Verifying installation

To verify that Perl has been correctly installed and configured via your PATH settings, open a new terminal interface and enter:

perl -v

followed by hitting the Return key. Perl is successfully installed if you can see the version of Perl in the command line.