The Perl Application Development and Refactoring Environment (Padre) is a GUI IDE for Perl with the rich code editor and friendly interface. Padre is a free open source software, under the umbrella of the GPL. It is multi-platform software that can be installed on Windows, Linux, and Mac OS.
In this article, we are going to take a short tour with installing and using Padre. Wish you nice reading.
To obtain and install Padre, follow these steps:
1. From your Internet browser, navigate to http://padre.perlide.org/download.html
2. Click Download DWIM Perl 188.8.131.52 (v7)
3. On the download page, click dwimperl-184.108.40.206-v6.exe to start the download.
4. When the download is complete, double-click the setup file.
5. In the installation wizard, click Next three times.
6. Click Install to start the installation.
7. Click Finish to complete the installation.
Using the Padre IDE
1. To start writing Perl programs using Padre, we need to start it first. From the start menu, expand the DWIM Perl submenu, and click Padre, the Perl IDE.
This will open the Padre window.
2. Type the following script:
print("\nEnter your name: "); $name = <stdin>; print("\nHave a nice day, $name\n");
3. Click File à Save. In the save as dialog box, type the name you want to give to the new script file.
4. Your window should now look like this:
5. Now, execute the script. To do this, click the gray arrow:
Or you can also click on Run on the menu à Run Script:
6. If the syntax is correct, the above script should behave as follows:
7. Assume we forget the semicolon at the end of line 1. If we try to run the script, we will get the following error:
The interpreter tells about an error in line 2 that may be a result of a missing semi-colon in the previous line (line 1), which is really the case.
In this article, we had an introduction to the Perl IDE Padre. In the next article, we will learn how to use the Regex Editor tool in Padre to create and test your regular expression patterns.