In this preface, I’ll tell you about the history of Minimal Perl and the origins of this
book.
THE HISTORY OF MINIMAL PERL
The seeds of this book were sown many years ago, when I was building up my knowl-
edge of Perl, the greatest programming language I’d ever encountered (before or since).
While reading a variety of books on the subject, I was surprised that the authors felt
obliged to delve into so many of the different but equivalent choices for expressing
every basic operation in the language, as well as each of the syntactic variations for
expressing any one of those choices.
As an example, I’ve shown here some of the available choices for expressing in Perl
the simple idea that B should be executed only if A is True (with those letters repre-
senting arbitrary program elements). Both forward and backward variations for
expressing the dependency are included:1
Although some are inclined to present symptoms like these of Perl’s complexity and
redundancy as evidence of its “richness,” “versatility,” or “expressiveness,” many Perl
novices would surely have a different reaction—that Perl is needlessly complex and too
hard to learn.
Minimal Perl was created to address these obstacles presented by Perl’s redundancy
and complexity. By emphasizing Perl’s grep, sed, and awk-like features, and relying
Forward
Backward
A and B;
B if A;
A && B;
B if A;
A and do { B };
do { B } if A;
A && do { B };
do { B } if A;
if (A) { B };
B if A;
unless (!A) { B };
B unless !A;
1Before you despair, I should point out that Minimal Perl uses only 2 of these variations—which is all
anybody needs!
xx
on concepts such as inputs, filters, and arguments, it allows Unix1 users to directly apply
their existing knowledge to the task of learning Perl. So rather than being frustrated
with Perl’s complexities and disappointed with its steep learning curve, they quickly
and painlessly acquire the ability to write useful programs that can solve a wide variety
of problems.
My first publ
1