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.
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, ...