In this part:
In this section, six articles provide glimpses into the aesthetics
of Perl. The articles touch on music, art, style, conversation, and the
lifestyle of the lazy, impatient, and hubristic, in which appliances do
the programmers bidding.
We begin with the first article from the first issue of TPJ: an
essay by Perl creator Larry Wall that compares programming languages to
music. Two sentences from his article have always resonated with
In trying to make programming predictable, computer scientists
have mostly succeeded in making it boring.
LISP has all the visual appeal of oatmeal with fingernail
clippings mixed in.
Personally, I like LISP, and agree with those who think that its
Scheme dialect is ideal for teaching computer science. But reading
Larrys sentiments made me realize why I defected from LISP to Perl:
programming languages shouldnt make everything look the same. When all
code looks identical, programming becomes a matter of rote instead of a
creative act of literary expression. It is that creativity that gave
Perl its culture, and is what gave rise to the topics covered throughout
this book, from the Obfuscated Perl contest to error messages delivered
In this part:
In this section, four articles demonstrate some scientific
applications of Perl, with two hobbyist-oriented topics followed by two
professional topics. John Redford begins with an article about how he
designed and built a sundial for his backyard, using Perl to give it
accuracy down to the minute. Brad Murray and Ken Williams follow with a
tutorial on genetic algorithms in Perl, showing how to breed functions
that incrementally evolve toward a desired solution.
One of the most popular articles in TPJs history was Lincoln
which chronicled how he used our favorite language to glue together
disparate data formats originating in genome laboratories scattered
around the globe. Astronomers Karl Glazebrook and Frossie Economou
conclude the chapter with a description of the Perl Data Language, an
extension to Perl optimized for manipulating large data sets such as
In this part:
In this section, Perl demonstrates what makes it the language of
choice for manipulating language, with fifteen articles covering
everything from state-of-the-art research in natural language processing
and speech synthesis to practical problems like formatting text and
Natural language processinggetting a computer to understand human
languageis one of those fields that seems easy at first but is actually
fraught with difficulties. NLP textbooks often demonstrate the
perversity of English with sentences like Colorless green ideas sleep
furiously, which is grammatical but nonsensical; The horse raced past
the barn left, which seems ungrammatical but isnt; and Time flies
like an arrow, which is perfectly good English but has four competing
The section begins with two articles about programs that converse:
John Nolans article on a bot that dispenses psychiatric advice, and
Kevin Lenzos article on the purl bot, which helps out Perl novices on
Internet Relay Chat. The ever-prodigious Kevin follows up with another
of the research areas that he pursues at Carnegie Mellon: open source
speech synthesis in Perl.Next, Prof.Damian Conway shows you how to
format text automatically with Text::Autoformat, which manipulates the
indentation, quoting, bulleting, and margins of text.
In this part:
In this section, ten articles explore games that you can play and
manipulate from Perl, and quizzes to test (and increase) your Perl
knowledge. The first article is my survey of the world of Perl games,
from ready-to-run programs to utilities that help you build your own
games. I follow up with an article on the Prisoners Dilemma, one of the
foundational puzzles of game theory.
Next, Michael Edmonson introduces his Rezrov interpreter for
Infocom games, which allows you to control Infocoms text-based
adventures from Perl.Greg Bacon then describes a graphical solitaire
game implemented in Perl/Tk.
The remainder of the section consists of six Perl quiz shows.
First, the four quiz shows I emceed at the OReilly Perl and Open Source
conferences, followed by one that I wrote for the Perl Whirl
conference/cruise. And in case those are too easy for you, the section
concludes with Tom Christiansens Perl Wizards Quiz.
In this part:
I received the following note from a poetry teacher as this book
was zooming toward publication:
What the heck is a Perl poem? Ive been writing and teaching
poetry since 1961, and I never heard of the term. Id like to know so
as to see if my students and I can write perl(s).
Conventional poems are passive: they cant do anything other
than sit on a page and wait for people to read them. Perl poems, on
the other hand, are functional: they are active programs that a
computer can execute. What the poem/program does is limited only by
the poets imagination.
The most flexible computer language naturally lends itself to this
most flexible linguistic endeavor. Perl poetry has been around since
1990; the original Perl poet, Sharon Hopkins, has had her work published
in the Economist and
In this section, Damian Conway discusses his Coy module, which
renders error messages as haiku. Sean Burke then shows you how to use
Perl to find rhymes with the proper stress and meter, and Kevin Meltzer
and I conclude the section with the results of the first ever Perl
Editors note: This article was originally written in
1996, but still applies to current elections
The U.S. Presidential election once again draws near, and once
again we see a contest between two men, each representing one of the two
major U.S. political parties. So it goes with the two-party system.
What is it that makes the two-party system a two-party system?
Its a direct consequence of plurality voting, the predominant form of balloting used in the
United States where the highest vote getter wins an election. This
relationship between the two-party duopoly and plurality voting is known as Duvergers Law, after the 20th century political scientist who had the
guts to call it a law (Riker, 1982).
Duvergers Law has some disturbing consequences and leaves many
voters dissatisfied with the status quo. Politicians will always claim
to feel our pain, but at least in the U.S., two-party skeptics abound.
Recent polls have shown that nearly 60% of Americans would support the
formation of a new major party (Barrett, 1996).
In this part:
When I began TPJ, I knew that hosting an Obfuscated Perl contest
was a must. Soon after launching the magazine, Felix Gallo volunteered
to author the announcements and results, and his twisted eloquence hit
the mark perfectly. The contests challenged the Perl community to
generate programs so contorted that the judges (Felix and I) couldnt
deduce how they worked. Some of the entries were surprisingly
educational and useful, most were grotesquely humorous, and a few became
the firstever publication of Perls most obscure nooks and
The notion of squeezing a program into the smallest space
available isnt as frivolous as it might seem. Computational theorists
sometimes measure the complexity of an algorithm by how concisely it can
be expressed; the briefer the program, the simpler the algorithm.
Brevity can have political implications as wellconsider the old furor
over the legality of exporting the RSA cryptosystem, which has been
implemented in successively tinier Perl programs, culminating in this
two-line obfuscated masterpiece by Adam Back and others: