Tutorial: How to Program in Perl on Your Windows Computer

By Howard Charles Best, May 12, 2006

Major update: July 4, 2009

Remember when the IBM PC first came out, and you used “BASICA” or “GWBASIC” to do “just about anything?” Later on, “Borland Turbo Pascal” became very popular because it was even more powerful, and it was much faster because it was a compiler instead of an interpreter.

Now you can use Perl to do “just about anything,” and it’s a free program! Perl is also very fast because it’s also a compiler. However, it has the advantages of an interpreter because you don’t have to bother with any complicated command lines or intermediate files. (No more .obj files, .tsd files or space hungry .exe files to contend with!) It compiles the source code in the “wink of the eye” at run time!

DOWNLOADING PERL

INSTALLING PERL

9. Double click the following newly downloaded file in order to begin installing Perl:

10. Click Next >.

11. Select I accept… & click Next >.

12. Click the down arrow for ActivePerl and click Entire feature will be unavailable. Now it should look something like the following:

13. Click the + sign.

14. Click the down arrow for PerlEx and click Will be installed...

You may be tempted to also select Documentation, but don’t. The documentation is not very good, it takes up an additional 28 MB on your hard drive, and it slows down the installation process considerably. The installation is surprisingly slow even without installing the documentation. Better to go to http://perldoc.perl.org/ for your Perl documentation.

15. Now it should look something like this:

16. Click Next >.

17. Uncheck both options:

18. Click Next >.

19. Click Install.

20. Click Finish.

21. Now your drive C root directory should look something like this (The Perl folder has been added):

22. Rename Perl to usr. This is to make your Perl installation compatible with the rest of the tutorials on this website. The original reason for the rename was to make the local installation compatible with typical web servers for local testing of Perl .cgi web pages using XAMPP.

TESTING PERL, PART 2

23. Again double-click the HelloWorld.bat icon on your desktop. This time it should work: