Higher-Order Perl

[img_assist|nid=1116|title=|desc=|link=none|align=left|width=150|height=185]Mark Jason Dominus' absolutely great Perl book is now available for free download in PDF format by virtue of special permission from the publisher.

Higher-Order Perl is about functional programming techniques in Perl. It's about how to write functions that can modify and manufacture other functions. Why would you want to do that? Because that way your code is more flexible and more reusable. Instead of writing ten similar functions, you write a general pattern or framework that can generate the functions you want; then you generate just the functions you need according to the pattern. The program doesn't need to know in advance which functions are necessary; it can generate them as needed. Instead of writing the complete program yourself, you get the computer to write it for you.

Preface by Damian Conway, Co-designer of Perl 6

As a programmer, your bookshelf is probably overflowing with books that did nothing to change the way you program... or think about programming.

You're going to need a completely different shelf for this book.

While discussing caching techniques in Chapter 3, Mark Jason Dominus points out how a large enough increase in power can change the fundamental way you think about a technology. And that's precisely what this entire book does for Perl.

It raids the deepest vaults and highest towers of Computer Science, and transforms the many arcane treasures it finds - recursion, iterators, filters, memoization, partitioning, numerical methods, higher-order functions, currying, cutsorting, grammar-based parsing, lazy evaluation, and constraint programming - into powerful and practical tools for real-world programming tasks: file system interactions, HTML processing, database access, web spidering, typesetting, mail processing, home finance, text outlining, and diagram generation.

Along the way it also scatters smaller (but equally invaluable) gems, like the elegant explanation of the difference between "scope" and "duration" in Chapter 3, or the careful exploration of how best to return error flags ni Chapter 4. It even has practical tips for Perl evangelists.

Dominus presents even the most complex ideas in simple, comprehensible ways, but never compromises on the precision and attention to detail for which he is so widely and justly admired.

His writing is - as always - lucid, eloquent, witty, and compelling.

Aptly named, this truly is a Perl book of a higher order, and essential reading for every serious Perl programmer.


Higher-Order Perl is copyright © 2005 by Elsevier Inc. Unauthorized reproduction or distribution is absolutely forbidden.

About the Author

Mark Jason Dominus has been programming in Perl professionally since 1992, when he was a UNIX sysadmin with the University of Pennsylvania Department of Computer and Information Sciences. Mark is the author of several standard Perl modules and was the managing editor of www.perl.com from 1999-2001. He was also a columnist for The Perl Journal for several years and is a frequent speaker and lecturer at numerous Perl conferences and meetings.


Download the whole book