Skip to Content
Intermediate Perl, 2nd Edition
book

Intermediate Perl, 2nd Edition

by Randal L. Schwartz, brian d foy, Tom Phoenix
July 2012
Intermediate to advanced
396 pages
9h 16m
English
O'Reilly Media, Inc.
Content preview from Intermediate Perl, 2nd Edition

Chapter 2. Using Modules

The killer feature of Perl is the Comprehensive Perl Archive Network, which we just call CPAN. Perl already comes with many modules, but there are many more third-party modules available from CPAN. If we have a problem to solve or a task to complete with Perl, there’s probably a module on CPAN that will help us. An effective Perl programmer is the one who uses CPAN wisely. We covered this briefly in Learning Perl, but we’ll cover it again here. It’s that important.

Note

We can explore CPAN through its master site (http://www.cpan.org/) or one of its search interfaces, CPAN Search (http://search.cpan.org/) and MetaCPAN (https://www.metacpan.org/).

Modules are the building blocks for our programs. They can provide reusable subroutines, variables, and even object-oriented classes. On our way to building our own modules, we’ll show some of those you might be interested in. We’ll also look at the basics of using modules that others have already written.

As we noted in Learning Perl, we don’t have to understand everything about modules and how they work on the inside to use them (although by the end of this book you should know much more about that). By following the examples in the module documentation, we can still get quite a bit done. To jump-start our Perl, we’ll start to use Perl modules right away even though we explain their mechanics and special syntax later.

The Standard Distribution

Perl comes with many of the popular modules already. Indeed, most of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Perl, 2nd Edition

Mastering Perl, 2nd Edition

brian d foy
Perl & LWP

Perl & LWP

Sean M. Burke
Advanced Perl Programming

Advanced Perl Programming

Sriram Srinivasan

Publisher Resources

ISBN: 9781449343781Errata Page