Open Source Perl Books

Grasp Perl with Open-Source Books

Perl Books

Programming is about solving problems and good communication. But before code is written, you need to know how to solve the problem. Breaking the problem into component parts assists in the process. And being able to model the problem so that it’s easy to implement and test also helps. Combine this with a solid understanding of the programming language itself – a good programming book contributes to all aspects of problem solving. Perl has the virtue it can solve a problems in a few lines of code. Perl programmers solve problems and get things done.

The popularity of a book is influenced by personal feelings, tastes, and opinions. Programming books accord to this general rule. There is a wide range of Perl books. As Perl is an open source programming language, with an eclectic heritage written by Larry Wall with thousands of contributors, it is welcome some authors have released their Perl books under a freely distributable license. I select 16 excellent Perl books (divided into 2 pages) which help master this language. All of the books are released under an open source license.

By way of background, Perl is a high-level, general-purpose, interpreted, scripting, dynamic programming language released under the GPL or Artistic license. Perl’s syntax has its roots in shell scripting tools, borrowing features from other languages including C, shell script (sh), AWK, and sed. It is available for most operating systems. Perl is implemented as an interpreted (not compiled) language. It is procedural, with variables, expressions, assignment statements, control structures, blocks and subroutines.

Perl is a versatile language. It is often used to write (CGI) scripts, manipulate text, general web programming, networking, system administration, prototyping, database access, and graphical programming. One of the most powerful features of Perl is its extensive library of modules. Many of these modules are available from the Comprehensive Perl Archive Network, which mirrors over 178,000 Perl modules.

Books 1-8 are listed below. Books 9-16 are on the next page.

We have published a series covering the best open source programming books for other popular languages. Read them here.

Modern Perl

Modern Perl

By Chromatic (290 pages)

Modern Perl is designed to help programmers of all levels of proficiency. The book is not just a Perl tutorial. It explains how and why the language works, so that the full power of Perl can be unleashed. The book is updated for Perl 5.22, to demonstrate the latest and most effective time-saving features.

Modern Perl is one way to describe the way the world’s most effective Perl 5 programmers work. They use language idioms. They take advantage of the CPAN. They show good taste and craft to write powerful, maintainable, scalable, concise, and effective code.

This book providing a wealth of information on:

  • The Perl philosophy
  • Perl and its community focusing on CPAN, community and development sites
  • The Perl language introducing names, variables, values, control flow, scalars, arrays, hashes, coercion, packages, references, and nested data structures
  • Operators – a series of one or more symbols used as part of the syntax
  • Functions – a discrete, encapsulated unit of behaviour
  • Regular Expressions and Matching – this chapter overviews the important regex features
  • Objects – discrete, unique entities with their own identities
  • Advanced OO Perl
  • Style and Efficacy explaining the importance of writing maintainable, idiomatic, and effective Perl
  • Managing Real Problems covering testing, handling warnings, files, modules, distributions, and more
  • Perl Beyond Syntax
  • What to Avoid

The electronic versions of this book are released under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Perl Language Reference Manual

The Perl Language Reference Manual

By Larry Wall and others (724 pages)

This book describes the syntax of Perl and its built-in datatypes, operators, functions, variables, regular expressions and diagnostic messages. There is a complete copy of the book in HTML format.

Topics cover:

  • Introduction – a quick overview of Perl along with pointers to further documentation
  • How to execute the Perl interpreter
  • Perl syntax including declarations, comments, simple statements, compound statements, loop control, for loops, switch statements, and more
  • Perl data types such as variable names, scalar values, scalar value constructors (version strings, special literals, barewords, and array joining delimiter), list value constructors, subscripts, and slices
  • How Perl internally handles numeric values
  • Perl operators and precedence
  • Perl subroutines
  • Perl built-in functions
  • Pre-defined variables
  • Regular expressions – describes the syntax of regular expressions in Perl
  • Regular expression backslash sequences – describes all backslash and escape sequences
  • Regular expression character classes – discusses the syntax and use of character classes in Perl regular expressions
  • Quick reference to Perl’s regular expressions
  • Perl references and nested data structures
  • Perl objects

and much more…

This book is published under the GNU General Public License, version 3.

Beginning Perl

Beginning Perl

By Simon Cozens (1029 pages)

Beginning Perl is a book which as its name suggests is written for beginners. It starts with the absolute basics of Perl, guiding the reader carefully through to complex operations such as using Perl as a CGI language. It covers the whole of the core Perl language.

The book covers the following topics:

  • Installing Perl on Windows and UNIX
  • Working with simple values
  • Lists and Hashes – looks at some control structures, and learn how to process data more than once without reproducing code
  • Loops and Decisions
  • Regular Expressions – one of the most powerful features of Perl
  • Files and Data – shows you how to read and write to files, and techniques for handling files, directories, and data
  • References
  • Subroutines – define, order of declaration, parameters and arguments, return values
  • Running and Debugging Perl – covers error messages, diagnostic modules, Perl command line switches, and debugging techniques / Perl debugger
  • Modules – examines how Perl works with DataBase Manager modules and DataBase Interface module
  • Using Perl as an object-oriented language
  • Introduction to CGI – looks at how CGI works by writing some simple CGI scripts and using the CGI.pm module
  • Perl and Databases
  • The World of Perl – tempts the programmer on what they can do with Perl

The book is licensed under the Creative Commons Attribution-NoDerivs-NonCommercial License.

Pratical mod_perl

Practical mod_perl

By Eric Cholet, Stas Bekman (924 pages)

Practical mod_perl is regarded as the definitive book on how to use, optimize, and troubleshoot mod_perl. It’s an extensive guide to the nuts and bolts of the powerful and popular combination of Apache and mod_perl. From writing and debugging scripts to keeping your server running without failures, the techniques in this book will help you squeeze every ounce of power out of your server.

mod_perl is an Apache module that builds the power of the Perl programming language directly into the Apache web server, giving rise to a fast and powerful web programming environment.

The book covers the following topics, and more:

  • Configuring mod_perl optimally for your web site
  • Porting and optimizing programs for a mod_perl environment
  • Performance tuning: getting the very fastest performance from your site
  • Controlling and monitoring the server to circumvent crashes and clogs
  • Integrating with databases efficiently and painlessly
  • Debugging tips and tricks
  • Maximizing security

The site’s website has been down since October 2016, but there is a copy of the book available at archive.org.

The complete book is available online under the terms of the CreativeCommons Attribution Share-Alike License.

Extreme Programming in Perl

Extreme Programming in Perl

By Robert Nagler (182 pages)

Extreme Perl is a book about Extreme Programming, a software development methodology that enables users, business people, programmers, and computers to communicate effectively, using the programming language Perl.

This book invites Perl programmers and their customers to take a fresh look at software development. Customers, and business people in general, will learn how Extreme Programming enables customer-programmer communication for efficient and flexible requirements gathering. Programmers will see how the methodology’s focus on teamwork, incremental testing, and continuous design allows them to take pride in their craft.

Areas covered include:

  • Release Planning – a list of stories (requirements) prioritized by business value
  • Iteration Planning – a prioritized list of development tasks estimated by the people who will be implementing them
  • Pair Programming – the output is one or more unit tests and the software that passes those tests
  • Tracking – explains how tracking works, what’s tracked, ways to keep everybody informed, and most importantly, how to get back on track
  • Acceptance Testing – demonstrates how the customer can create automated acceptance tests. Acceptance tests are explained in general and with example test scripts
  • Coding Style – explains the need for a coding style in XP and discusses how to go about creating one
  • Test Driven Design – introduces test-driven design through the implementation of an exponential moving average (EMA), a simple but useful mathematical function. This chapter also explains how to use the CPAN modules Test::More and Test::Exception
  • Continuous Design – evolves the design we started in Test-Driven Design
  • Unit Testing – test a post office protocol (POP3) client available from CPAN
  • Refactoring – demonstrates several refactorings in the context of a single example, Mail::POP3Client.

The book is licensed under a Creative Commons Attribution 4.0 International License.

Impatient Perl

Impatient Perl

By Greg London (151 pages)

Impatient Perl is designed for individuals who wish to learn Perl or individuals that already program in Perl and do not have the patience to search for information to learn and use Perl. The book should be a useful desk reference for common Perl related questions.

Topics covered include:

  • The three basic storage types:
    • Scalars – store strings, numbers (integers and floats), references, and filehandles
    • Arrays – stores a collection of scalars via an integer index
    • Hashes – stores scalars that are accessed via a string index
  • List Context – a concept built into the grammar of Perl
  • References – points to something else
  • Control Flow – allow developers to alter the order of execution while the application is running
  • Packages and Namespaces and Lexical Scoping
  • Subroutines
  • Compiling and Interpreting – compiling translates the source test into machine usable internal format; interpreting – executing the machine usable, internal format
  • Code Reuse, Perl Modules – a discrete component of software for the Perl programming language
  • The use Statement – allows a Perl script to bring in a Perl module and what declarations that have been made available by the module
  • bless() – this function changes the string that would be returned when ref() is called
  • Method Calls
  • Procedural Perl
  • Object Oriented Perl
  • Object Oriented Review
  • CPAN – Comprehensive Perl Archive Network which contains a huge number of Perl modules to download
  • The Next Level
  • Command Line Arguments
  • File Input and Output – Perl has functions used for reading from and writing to files
  • Operating System Commands
  • Regular Expressions – the text processing workhouse of Perl. Regular expressions lets you search strings for patterns, find out what matched the patterns, and substitute the matched patterns with new strings
  • Modifiers – regular expressions can take optional modifiers that tell Perl additional information about how to interpret the regular expression
  • Parsing with Parse::RecDescent
  • Perl, GUI and Tk

This book is made available under the GNU Free Documentation License, Version 1.3 or later. The author has kindly given permission for this article to include a copy of the front-cover.

Perl & LWP

Perl & LWP

By Sean M. Burke (343 pages)

Perl & LWP instructs how individuals can write web client applications with LWP and its related HTML modules. Library for WWW in Perl is a set of modules that allow requests to be sent to the web.

The book has chapters on:

  • Web Basics – covers the construction of URLs and the concepts behind HTTP. You’ll learn how to automate the most basic web tasks with the LWP::Simple module
  • The LWP Class Model – introduces the classes that LWP uses to represent browser objects and response objects
  • URLs – parsing, constructors, output, comparison, components of a URL, and queries
  • Forms – shows you how to write programs to submit form data and get the resulting page
  • Simple HTML Processing with Regular Expressions
  • HTML Processing with Tokens – use a rudimentary approach to processing HTML source: Perl regular expressions
  • Tokenizing Walkthrough – walks though the implementation of a data extraction task
  • HTML Processing with Trees – teaches you how to use the HTML::TreeBuilder module to construct trees from HTML, and how to process those trees to extract information
  • Modifying HTML with Trees – four ways in which a tree can be altered: alter a node’s attributes; delete a node; detach a node and reattach it elsewhere; add a new node
  • Cookies, Authentication and Advanced Requests
  • Spiders – how to write recursive web user agents, spiders

This book is aimed at someone who already knows Perl and HTML.

This “1.1” edition of Perl and LWP is available online under the terms of the Creative Commons Attribution Share-Alike License.

Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams (320 pages)

The Embedding Perl in HTML with Mason book documents the HTML::Mason framework in detail, including chapters on component syntax, Mason object APIs, a sample site walkthrough, recipes, and details on Mason’s advanced features and how to use them.

The book shows individuals how to create large, complex, dynamically driven web sites that look good and are a snap to maintain. You’ll learn how to visualize multiple Mason-based solutions to any given problem and select among them. The book covers the latest line of Mason development 1.1x, which has many new features, including line number reporting based on source files, sub-requests, and easier use as a CGI.

This book is published under the Open Publication License.


Proceed to Next Page

PROGRAMMING LANGUAGE PROFILES

Ada, Awk, Assembly, Bash, C, C++, C#, Clojure, CoffeeScript, ECMAScript, Erlang, Forth, Fortran, Go, Haskell, HTML, Java, JavaScript, LaTeX, Lisp, Logo, Lua, OCaml, Pascal, Perl, PHP, Prolog, Python, R, Ruby, Rust, Scala, Scheme, Scratch, SQL, Swift, TeX, VimL

Pages: 1 2

2 Comments

Leave a Reply