Games, Diversions & Perl Culture: Best of the Perl Journal


The Perl Journal (TPJ) did something most print journals aspire to, but few succeed. Within a remarkable short time, TPJ acquired a cult-following and became the voice of the Perl community. Every serious Perl programmer subscribed to it, and every notable Perl guru jumped at the opportunity to write for it. Back issues were swapped like trading cards. No longer in print format, TPJ remains the quintessential spirit of Perl—a publication for and by Perl programmers who see fun and beauty in an admittedly quirky ...

See more details below
Paperback (1ST)
$49.99 price
Other sellers (Paperback)
  • All (13) from $5.71   
  • New (8) from $20.94   
  • Used (5) from $5.71   
Games, Diversions & Perl Culture: Best of the Perl Journal

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$22.99 price
(Save 42%)$39.99 List Price


The Perl Journal (TPJ) did something most print journals aspire to, but few succeed. Within a remarkable short time, TPJ acquired a cult-following and became the voice of the Perl community. Every serious Perl programmer subscribed to it, and every notable Perl guru jumped at the opportunity to write for it. Back issues were swapped like trading cards. No longer in print format, TPJ remains the quintessential spirit of Perl—a publication for and by Perl programmers who see fun and beauty in an admittedly quirky little language.Games, Diversions, and Perl Culture is the third volume of The Best of the Perl Journal, compiled and re-edited by the original editor and publisher of The Perl Journal, Jon Orwant. In this series, we've taken the very best (and still relevant) articles published in TPJ over its 5 years of publication and immortalized them into three volumes.The 47 articles included in this volume are simply some of the best Perl articles ever written on the subjects of games, diversions, and the unique culture of this close-knit community, by some of the best Perl authors and coders. Games, Diversions & Perl Culture focuses on entertaining topics that make Perl users such fanatics about the language. You'll find all of the playful features TPJ offered over the years, including the Obfuscated Perl Contests, Perl Quiz Shows, humor articles, and renowned one-line recipes. The book also contains a panoply of quirky applications of Perl, including genetic algorithms, home automation, music programming, and an entire section on natural language processing.This anthology is an unmatched compendium of Perl lore.

This third volume in the series focuses on entertaining topics that make Perl users such fanatics about the language. Contains Perl quiz shows, humor articles, and more.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
The Perl community’s unique combination of whimsy and intelligence has rarely been displayed as well as in Games, Diversions & Perl Culture. Editor Jon Orwant has combed the past five years of Perl Journal to select nearly 50 terrific articles.

This is actually the third Perl Journal collection Orwant’s edited. Computer Science and Perl Programming and Web Graphics and Perl/Tk were incredibly and immediately useful. With this one, though, you get to have a good deal of fun along with the problem solving.

Here’s where you’ll find articles on using Perl to search for English-language rhymes, and learn how to control your home X10 system with Perl. (Household appliances aren’t too swift. Don’t forget to build an event queue so your computer can keep busy while it’s waiting for responses.) And Ray F. Piodasoll shows you some of the program bugs he inadvertently introduced into the U.S. nuclear defense arsenal.

Don’t miss Lincoln Stein’s classic article on how Perl “saved” the Human Genome Project by enabling its two major laboratories to exchange data and compare results. Or Sean M. Burke and Sheri Wells-Jensen on using Perl to transform common English into Braille -- contractions, abbreviations, and all. (You’ll learn a lot about regexes.)

All of Perl Journal’s classic “Obfuscated Perl” contests are reprinted here, plus the legendary Perl Internet Quiz Shows from O’Reilly’s annual conventions. This is the perfect entertainment for anyone who loves Perl -- and a great gift for “that Perl monger in your life.” Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks for Dummies, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780596003128
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 6/28/2003
  • Series: Best of the Perl Journal Series
  • Edition description: 1ST
  • Edition number: 1
  • Pages: 588
  • Product dimensions: 7.06 (w) x 9.30 (h) x 1.42 (d)

Meet the Author

Jon Orwant founded The Perl Journal and received the White Camel lifetime achievement award for contributions to Perl in 2004. He's Engineering Manager at Google, where he leads Patent Search, visualizations, and digital humanities teams. For most of his tenure at Google, Jon worked on Book Search, and he developed the widely used Google Books Ngram Viewer. Prior to Google, he was CTO of O'Reilly, Director of Research at France Telecom, and a Lecturer at MIT. Orwant received his doctorate from MIT's Electronic Publishing Group in 1999.

Read More Show Less

Table of Contents

Finding Perl Resources;
Conventions Used in This Book;
Using Code Examples;
Comments and Questions;
Chapter 1: Introduction;
Part I: Culture;
Chapter 2: Wherefore Art, Thou?;
2.1 Music to My Ears;
Chapter 3: TPJ Cover Art: From Camels to Spam;
3.1 TPJ #1: The Camel;
3.2 TPJ #2: The Pearl;
3.3 TPJ #3: RSA on Greenbar;
3.4 TPJ #4: Etch-a-Sketch.;
3.5 TPJ #5: Commodities;
3.6 TPJ #6: Scrabble;
3.7 TPJ #7: Spiderball;
3.8 TPJ #8: The Coffee Cup Fiasco;
3.9 TPJ #9: Drummer/Coder Wanted;
3.10 TPJ #10: The Underwood Typewriter;
3.11 TPJ #11: The Conspiracy;
3.12 TPJ #12: The Atari Perl Cartridge;
3.13 TPJ #13: Dance Remixes;
3.14 TPJ #14: Outlook Not So Good;
3.15 TPJ #15: Braille blocks;
3.16 TPJ #16: e. e. cummings’ Gravestone;
3.17 TPJ #17: Napster;
3.18 TPJ #18: Spam;
3.19 TPJ #19: Monopoly Money;
3.20 TPJ #20: WAP;
Chapter 4: Perl Style;
4.1 Background;
4.2 Existing Measures;
4.3 The Basic Units;
4.4 The Tool;
4.5 Usage;
4.6 Why This Should Be Hard To Do;
4.7 The Perl Compiler to the Rescue;
4.8 Future Directions;
4.9 Acknowledgments;
Chapter 5: Home Automation with MisterHouse;
5.1 HA! Perl?;
5.2 MisterHouse;
5.3 Objects in the Home;
5.4 Talking and Listening;
5.5 A Smart TV Guide;
5.6 Whole House CallerID;
5.7 Squeaky Stairs;
5.8 You Have Mail;
5.9 Say What?;
5.10 Give Your House a Brain;
Chapter 6: Home Automation: The X10 Nitty-Gritty;
6.1 Simple Output Commands: The CM17;
6.2 The ControlX10::CM17 and ControlX10::CM11 Modules;
6.3 What’s in a Command?;
6.4 Timing Issues;
6.5 Bidirectional I/O with the CM11;
6.6 A Few More Considerations;
Chapter 7: A Day in the Life of comp.lang.perl.misc;
7.1 A Little History;
7.2 How the “Day in the Life” Was Done;
7.3 The Raw Statistics;
7.4 The Day’s Weather Report;
7.5 Netiquette Nits;
7.6 The Regulars;
7.7 The Future of comp.lang.perl.misc;
Part II: Science;
Chapter 8: Perl-fect Sundials;
8.1 Building Your Own;
Chapter 9: Genetic Algorithms;
9.1 The Genetic Code;
9.2 Assembling an Organism;
9.3 Survival of the Fittest;
9.4 Sex and Mutation;
9.5 The Terrifying Results;
9.6 Other Applications;
9.7 Going Further;
9.8 Other Fitness Functions;
9.9 Resources;
Chapter 10: How Perl Saved the Human Genome Project;
10.1 Bioinformatics and Perl;
10.2 Other Uses for Perl;
10.3 Problems with Perl;
Chapter 11: PDL: The Perl Data Language;
11.1 The perldl Shell;
11.2 Listing of a Few PDL Functions;
11.3 Where Are We Now?;
Part III: Language;
Chapter 12: Chatbot::Eliza;
12.1 How It Works;
12.2 What Now?;
12.3 References;
Chapter 13: Infobots and Purl;
13.1 IRC;
13.2 Bots and Infobots;
13.3 So What?;
13.4 Are You Spongeworthy?;
13.5 You Can’t Do That in Public!;
13.6 What Are You Thinking?;
13.7 Idiot Savant;
13.8 A Sense of Play;
13.9 What? We Ordered No Pizzas!;
13.10 Future Directions;
13.11 Where to Get It;
13.12 Acknowledgments;
13.13 References;
Chapter 14: Speech Synthesis;
14.1 Pre-Recorded Sentences;
14.2 Lexical Synthesis in One s///;
14.3 The Out-of-Vocabulary Problem: Synthesis in One s///e;
14.4 Text-to-Phoneme Conversion;
14.5 More Context: Two Substitutions;
14.6 What Else?;
14.7 References;
Chapter 15: Lazy Text Formatting;
15.1 Text::Autoformat;
15.2 Paragraphs;
15.3 Quoting;
15.4 Lists;
15.5 Quotations;
15.6 Widows;
15.7 Justification and Sentencing;
15.8 Future Features;
Chapter 16: Perl and MIDI: Simple Languages, Easy Music;
16.1 Hard Things Possible;
16.2 Approach 1: A Novel Language;
16.3 Approach 2: An Extensional Language;
16.4 Easy Things Easy;
16.5 Behold MIDI::Simple!;
16.6 “Relative” Notes;
16.7 Percussion, Uniformity, and noop;
16.8 The Object-Oriented Interface;
16.9 Using synch, and Some Actual Music;
16.10 Mod, Canons, and Rounds;
16.11 Future Features;
16.12 References;
Chapter 17: Braille Contractions and Regular Expressions;
17.1 Braille and Contractions;
17.2 Sample Text in Braille;
Chapter 18: Hypernyms, Hyponyms, Pertainyms, and Other Word Relationships;
18.1 Concepts in Wordnet;
18.2 Converting the Data;
18.3 Installing Lingua::Wordnet;
18.4 Basic Usage;
18.5 Movin’ It Up a Level;
18.6 Other Word Relationships;
18.7 Other Useful Functions;
18.8 What’s Next?;
Chapter 19: Parsing Natural Language;
19.1 I See a Pattern Developing;
19.2 Link Grammar;
19.3 Lingua::LinkParser;
19.4 Irregular Regular Expressions, Overloaded;
19.5 What Sucks? What Rocks?;
19.6 What Sucks, Regex Style;
19.7 The What-Sucks-Ometer;
19.8 There’s Lots More Here;
19.9 References;
19.10 A Full Lingua::LinkParser Example;
Chapter 20: Word Morphology;
20.1 Morphology: Word Form and Structure;
20.2 Morphological Analysis and Perl;
20.3 Constructing a Word Frequency List;
20.4 Morphological Inflections and Derivations;
20.5 Representing a Single Rule;
20.6 Representing Many Rules;
20.7 Telling Good from Bad;
20.8 The Key Insight!;
20.9 Implementing It;
20.10 Applying the Derivation Process to All Tokens;
20.11 Summary;
20.12 Future Work;
Chapter 21: Smart Matching for Human Names;
21.1 Installing the Modules;
21.2 Module Contents;
21.3 Using the Modules;
21.4 What They Do;
21.5 Matching Nicknames;
21.6 Conclusion;
Chapter 22: Localizing Your Perl Programs;
22.1 A Localization Horror Story: It Could Happen to You;
22.2 The Linguistic View;
22.3 Breaking gettext;
22.4 Replacing gettext;
22.5 Buzzwords: Abstraction and Encapsulation;
22.6 Buzzword: Isomorphism;
22.7 Buzzword: Inheritance;
22.8 Buzzword: Concision;
22.9 The Devil in the Details;
22.10 Proof in the Pudding: Localizing Web Sites;
22.11 References;
Chapter 23: Internationalized Sorting;
23.1 Default sort Versus “Normal” English Sorting;
23.2 Locale-Based Sorting;
23.3 Spanish: Cana y Caña;
23.4 Spanish: Chorizo, Chimichangas, Chicharrones, y Churros;
23.5 Bi-Level Sorting to the Rescue;
23.6 English: Résumé and Resume;
23.7 Optimizing with Memoization;
23.8 Sorting it All Out;
Chapter 24: Simulating Typos with Perl;
24.1 Simulating the Typos;
24.2 How to Identify Words;
24.3 Typos in Other Languages;
24.4 Results;
24.5 References;
Chapter 25: Correcting Typos with Perl;
25.1 Why Was It Written?;
25.2 How Does It Work?;
25.3 The Sub::Approx Module;
25.4 The Symbol::Approx::Sub Module;
25.5 Future Plans;
25.6 Afterword;
Chapter 26: Learning Japanese with an HTML Filter;
26.1 The Web;
26.2 Dictionary Database;
26.3 The CGI Script;
26.4 Taking It a Step Further;
26.5 Conclusion;
Part IV: Games and Quizzes;
Chapter 27: Games in Perl;
27.1 Strategy Games;
27.2 Cards;
27.3 Dice;
27.4 Word Games;
27.5 Twitch Games;
Chapter 28: The Prisoner’s Dilemma;
28.1 The Iterated Prisoner’s Dilemma;
28.2 The Three-Way Prisoner’s Dilemma;
28.3 The Prisoner’s Dilemma Programming Contest;
28.4 Results of the Contest;
Chapter 29: The Rezrov Infocom Game Interpreter;
29.1 Resurrecting the Z-Machine;
29.2 Enter the Camel;
29.3 What’s It Do?;
29.4 The Joy of vec;
29.5 Tinkering with the Z-Machine;
29.6 Teleport;
29.7 Bamf;
29.8 Pilfer;
29.9 Universal Command Set;
29.10 Interface Abstraction;
29.11 Performance Considerations;
29.12 Quantity Is Job One;
29.13 A Plea for Inlining;
29.14 Conclusion;
29.15 References;
Chapter 30: Tktk: A Perl/Tk Solitaire Game;
30.1 The Rules;
30.2 A First Cut;
30.3 Shuffling;
30.4 Layout;
30.5 Show the Tableau!;
30.6 Would You Like to Play a Game?;
30.7 Making the Moves;
30.8 Laying the Base;
30.9 Pickup Lines;
30.10 Oops!;
30.11 Finishing Touches;
Chapter 31: The First Perl/Internet Quiz Show;
31.1 Toss-up Questions;
31.2 Bonus Questions;
31.3 The Answers;
Chapter 32: The Second Perl/Internet Quiz Show;
32.1 Sample Questions;
32.2 Toss-up Questions;
32.3 Bonus Questions;
32.4 The Answers;
Chapter 33: The Third Perl/Internet Quiz Show;
33.1 Toss-up Questions;
33.2 Bonus Questions;
Chapter 34: The Fourth Perl/Internet Quiz Show;
34.1 Toss-up Questions;
34.2 Toss-up Answers;
34.3 Bonus Answers;
Chapter 35: The Perl Whirl Quiz Show;
35.1 Toss-up Questions;
35.2 Bonus Questions;
35.3 Toss-up Answers;
35.4 Bonus Answers;
Chapter 36: The Perl Wizard’s Quiz;
36.1 Answers;
Part V: Poetry;
Chapter 37: Just Another Perl Haiku;
37.1 The Tao of Haiku;
37.2 Haiku Online;
37.3 Artificial Haiku;
37.4 The Coy Module;
37.5 A Note About the Name;
37.6 Inside the Coy Module;
37.7 Mere Words;
37.8 Random Harvesting;
37.9 Filling in the Blanks;
37.10 The Other Type of Grammar;
37.11 Counting the Beat;
37.12 But Does the Bear Dance?;
37.13 Extending the Module;
37.14 Is There a Poet in the House?;
37.15 It Seemed Like a Good Idea at the Time;
Chapter 38: Searching for Rhymes with Perl;
38.1 Where to Look;
38.2 Preparing the Data;
38.3 Searching the Prepared Data;
38.4 Counting Syllables;
38.5 Coping with (Syllabic) Stress;
38.6 A Simple mpron Searcher;
38.7 Accommodating Another Notation;
Chapter 39: The Perl Poetry Contest;
39.1 The Categories;
39.2 The Results;
Part VI: Politics;
Chapter 40: Pairwise Voting;
40.1 The Preference Ballot;
40.2 Impossibility Theorems;
40.3 The Borda Method;
40.4 The Hare Method;
40.5 Pairwise Election Methods;
40.6 Condorcet’s Method;
40.7 Smith’s Method;
40.8 Copeland’s Method;
40.9 The Algorithms;
40.10 The Pairwise Engine;
40.11 Using CGI to Spit It All Out;
40.12 Random Thoughts;
40.13 References;
40.14 Sites;
Chapter 41: Secure Internet Voting;
41.1 About Secure Elections;
41.2 The Database Schema;
41.3 Generating VRNs;
41.4 The E-Ballot;
41.5 The vote Program;
41.6 Tallying the Votes;
Chapter 42: Perl and Nuclear Weapons Don’t Mix;
42.1 A Little Rocket Science;
42.2 Red Alert!;
Part VII: Obfuscated Perl;
Chapter 43: The Zeroth Annual Obfuscated Perl Contest;
43.1 The Categories;
43.2 How It Works;
43.3 Hints and Suggestions;
43.4 So There You Have It;
43.5 Results;
Chapter 44: The First Obfuscated Perl Contest;
44.1 Results;
Chapter 45: The Third Obfuscated Perl Contest;
45.1 Most Powerful;
45.2 Most Creative;
45.3 Best “The Perl Journal”;
45.4 Best of Show;
Chapter 46: The Fourth Obfuscated Perl Contest;
46.1 Results;
Chapter 47: The Fifth Obfuscated Perl Contest;
47.1 Results;
Chapter 48: One-Liners;
48.1 Useful One-Liners;
48.2 Not So Useful One-Liners;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)