Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Advanced Perl programming
Rothwell W., Apress, New York, NY, 2020. 308 pp. Type: Book (978-1-484258-62-0)
Date Reviewed: May 31 2021

I am not an everyday Perl programmer; that said, since learning it in the mid-90s from an excellent book by Randal L. Schwartz [1], I am always on the lookout to expand my knowledge of the language to see what else I need to acquire to become an expert. This book meets my expectations in every respect. Before reviewing its contents, however, a couple of disclaimers.

First, it has to be mentioned that the volume reviewed here is the last book in the author’s series on Perl. The previous ones, Beginning Perl programming: from novice to professional [2] and Pro Perl programming: from professional to advanced [3], appear to have been published almost simultaneously. The author often refers to them in the contents of the current book, but only to refresh the reader’s memory on certain topics, which they would have to know anyway if reading this advanced book.

Second, from the multitude of books on Perl that are available, I’ve had on my shelf for a long time another book of exactly the same title [4]. However, the time difference between the publication dates of the books seems to be so huge in the lifetime of the programming language that their comparison will not make much sense.

For the potential readers of the current book, it is not necessary to introduce them to Perl’s origins and history, so I will go straight to describing the contents. It starts with a chapter on command-line options, and justly so. Perl is a scripting language after all, and its programs, called scripts, are built out of commands, so knowing advanced options is extremely useful. There is not much to say here, but I enjoyed reading about and experimenting with some of those, such as an “-M” option to import certain variables and functions from a module.

The next four chapters are probably the most important part of the book since they are related to data types. One can safely say that Perl is a typeless language, which means that it is not necessary to declare types of variables in a program as they are assigned automatically. This feature, although hated by programming language purists, may be one of those that boosted Perl’s popularity. But there is a danger, of course: when improperly used, it may lead to some inadvertent effects causing failures. While there is no solid theory that one can apply to make their scripts safe, it is mostly practice that allows programmers to learn from each other and improve program quality. This is, in my opinion, the value of this part of the book, which includes chapters discussing references, arrays (including arrays of arrays), hashes (including hashes of hashes) and typeglobs (symbol table), all very practically oriented with examples.

This is followed by several chapters on modular programming: “Advanced Subroutine Handling,” “Packages and Namespaces,” “Building Modules,” and “Installing CPAN Modules” (CPAN stands for Comprehensive Perl Archive Networks). As the author justly states, subroutines have “many features and nuances that allow you to create some powerful code.” So he starts with their overview as a reminder and quickly moves to discussing less understood features, such as making persistent functions variables using the caller function, returning multiple values, exception handling, and so on.

Rothwell then moves to discussing packages and namespaces, keeping focus on the scope of variables, after which he outlines the process for creating modules, followed by a chapter on using existing modules from a CPAN repository. Readers can use this part to refresh or expand their knowledge of Perl, since every meaningful program must exploit modularity and existing libraries. And if one has put their hand on this book, they are likely to know this topic to some extent. This is also true for a chapter titled “POD” (for Plain Old Documentation) related to building modules.

The last part of the book is less interesting to me, personally, as it talks about some more scattered subjects; however, it may be icing on the cake for already advanced programmers. The three final chapters talk about truly advanced and new features, so I encourage everyone to browse them and see if there is anything new. One new item I enjoyed learning about was the “yada yada” operator, represented simply by an ellipsis “...,” which serves the purpose of what is in human language called a placeholder.

Reviewer:  Janusz Zalewski Review #: CR147276 (2110-0244)
1) Schwartz, R. L. Learning Perl. O’Reilly, Sebastopol, CA, 1993.
2) Rothwell, W. Beginning Perl programming: from novice to professional. Apress, New York, NY, 2019.
3) Rothwell, W. Pro Perl programming: from professional to advanced. Apress, New York, NY, 2020.
4) Srinivasan, S. Advanced Perl programming. O’Reilly, Sebastopol, CA, 1997.
Bookmark and Share
  Featured Reviewer  
 
Perl (D.4.9 ... )
 
 
General (D.2.0 )
 
Would you recommend this review?
yes
no
Other reviews under "Perl": Date
Programming perl
Wall L., Schwartz R., O’Reilly & Associates, Inc., Sebastopol, CA, 1991. Type: Book (9780937175644)
Feb 1 1992
Learning perl
Schwartz R., O’Reilly & Associates, Inc., Sebastopol, CA, 1993. Type: Book (9781565920422)
Sep 1 1994
Software engineering with Perl
Dichter C., Pease M., Prentice-Hall, Inc., Upper Saddle River, NJ, 1995. Type: Book (9780130169655)
Oct 1 1996
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy