Chapter 4. Perl Primer

This book assumes the reader is versed in Perl programming. What this book does not assume is that every reader will have written object-oriented Perl, or have used Perl to connect with MySQL, or even necessarily have written web applications in Perl. This book will attempt to iteratively introduce you to concepts you may or may not know about, but as a whole, provide knowledge to be able to build complete web applications.

This particular chapter will cover the first of those concepts — object-oriented Perl, as well as other Perl tricks, snippets, and other tools.

What Exactly Is Perl?

This question may seem more appropriate for a beginner's book on Perl programming. It may be. But the author of this book has had various revelations about writing Perl code throughout the years, especially after spending time writing software in other languages such as C and C++, and then returning to writing Perl programs. It's worth quantifying exactly what Perl is because different perspectives are always worth considering — giving a new way of thinking of things that might help you to understand Perl even better. At least you will have another description to give your mother if she ever asks.

Perl consists of program, perl, written in C, that compiles Perl code into an internal representation that it then interprets and executes, along with numerous libraries written in C and Perl.

Get Developing Web Applications with Perl, memcached, MySQL® and Apache now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.