Setting Up Perl Development Environment

Summary: in this tutorial, you’ll learn you step by step how to set up the Perl development environment.

To develop Perl applications, you need a Perl distribution and a code editor installed in your system

Install Strawberry Perl on Windows

If you’re using Windows, you can use the Strawberry Perl.

The Strawberry Perl is a Perl environment for Microsoft Windows. It contains all you need to develop and execute Perl applications.

To download Strawberry Perl, you navigate to the download page and download the appropriate version.

Once the download completes, you launch the setup wizard by double-clicking the installer file.

First, the setup wizard will launch like this:

Second, click the Next button to continue to setup. In this step, you need to accept the terms and license agreement. After accepting the terms, click the Next button.

Third, select the destination folder to install Strawberry Perl.

By default, it will be install to C:\Strawberry folder like the following. You can change it or leave the default and click the Next button:

Fourth, you’re ready to install Strawberry Perl. Click the Install button to begin the installation:

It’ll take few minutes to complete this step:

Fifth, once the installation completes, you’ll see the following window:

Finally, click the Finish button to open the readme file.

To verify the installation, you can open the Command Prompt on Windows and type the following command:

perl -v

You should see the following output:

This is perl 5, version 32, subversion 0 (v5.32.0) built for MSWin32-x64-multi-thread Copyright 1987-2020, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at, the Perl Home Page.
Code language: Shell Session (shell)

It means that you have successfully installed Strawberry Perl on your computer.

If you see something like the following:

'perl' is not recognized as an internal or external command, operable program or batch file.
Code language: Shell Session (shell)

.. then you need to check whether the C:\Strawberry\perl\bin directory is in the PATH variable. This assumes that you installed the Strawberry Perl to the C:\Strawberry folder.

If this is the case, you can run the following command to set the PATH variable:

setx path "%path%;C:\Strawberry\perl\bin"
Code language: Shell Session (shell)

Install Visual Studio Code

To write Perl code, you can use any plain text editor e.g., notepad, notepad++, or any text editors of your choice.

To make it easier to write Perl code, you need to have a good code editor with syntax highlighting and other features.

One of these editors is Visual Studio Code which is free. In addition, it supports Windows, macOS, and Linux. The Visual Studio Code is often called VS Code.

To download the VS Code, you navigate to the VS code homepage and download the version that suits your computer.

Installing VS Code is quite straightforward. After completing the installation, you can launch the VS Code to start programming Perl.

Now, you’re ready to develop the first Perl program called Hello, World!.

Happy programming and have fun.

Was this tutorial helpful ?