Book description
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.
Publisher resources
Table of contents
- Games, Diversions, and Perl Culture: Best of the Perl Journal
- A Note Regarding Supplemental Files
- Preface
- 1. Introduction
-
I. Culture
- 2. Wherefore Art, Thou?
-
3. TPJ Cover Art: From Camels to Spam
- TPJ #1: The Camel
- TPJ #2: The Pearl
- TPJ #3: RSA on Greenbar
- TPJ #4: Etch-a-Sketch.
- TPJ #5: Commodities
- TPJ #6: Scrabble
- TPJ #7: Spiderball
- TPJ #8: The Coffee Cup Fiasco
- TPJ #9: Drummer/Coder Wanted
- TPJ #10: The Underwood Typewriter
- TPJ #11: The Conspiracy
- TPJ #12: The Atari Perl Cartridge
- TPJ #13: Dance Remixes
- TPJ #14: Outlook Not So Good
- TPJ #15: Braille blocks
- TPJ #16: e. e. cummings’ Gravestone
- TPJ #17: Napster
- TPJ #18: Spam
- TPJ #19: Monopoly Money
- TPJ #20: WAP
- 4. Perl Style
- 5. Home Automation with MisterHouse
- 6. Home Automation: The X10 Nitty-Gritty
- 7. A Day in the Life of comp.lang.perl.misc
- II. Science
-
III. Language
- 12. Chatbot::Eliza
- 13. Infobots and Purl
- 14. Speech Synthesis
- 15. Lazy Text Formatting
- 16. Perl and MIDI: Simple Languages, Easy Music
- 17. Braille Contractions and Regular Expressions
- 18. Hypernyms, Hyponyms, Pertainyms, and Other Word Relationships
- 19. Parsing Natural Language
-
20. Word Morphology
- Morphology: Word Form and Structure
- Morphological Analysis and Perl
- Constructing a Word Frequency List
- Morphological Inflections and Derivations
- Representing a Single Rule
- Representing Many Rules
- Telling Good from Bad
- The Key Insight!
- Implementing It
- Applying the Derivation Process to All Tokens
- Summary
- Future Work
- 21. Smart Matching for Human Names
- 22. Localizing Your Perl Programs
- 23. Internationalized Sorting
- 24. Simulating Typos with Perl
- 25. Correcting Typos with Perl
- 26. Learning Japanese with an HTML Filter
-
IV. Games and Quizzes
- 27. Games in Perl
- 28. The Prisoner’s Dilemma
- 29. The Rezrov Infocom Game Interpreter
- 30. Tktk: A Perl/Tk Solitaire Game
- 31. The First Perl/Internet Quiz Show
- 32. The Second Perl/Internet Quiz Show
- 33. The Third Perl/Internet Quiz Show
- 34. The Fourth Perl/Internet Quiz Show
- 35. The Perl Whirl Quiz Show
- 36. The Perl Wizard’s Quiz
-
V. Poetry
-
37. Just Another Perl Haiku
- The Tao of Haiku
- Haiku Online
- Artificial Haiku
- The Coy Module
- A Note About the Name
- Inside the Coy Module
- Mere Words
- Random Harvesting
- Filling in the Blanks
- The Other Type of Grammar
- Counting the Beat
- But Does the Bear Dance?
- Extending the Module
- Is There a Poet in the House?
- It Seemed Like a Good Idea at the Time
- 38. Searching for Rhymes with Perl
- 39. The Perl Poetry Contest
-
37. Just Another Perl Haiku
-
VI. Politics
- 40. Pairwise Voting
-
41. Secure Internet Voting
- About Secure Elections
- The Database Schema
- Generating VRNs
- The E-Ballot
-
The vote Program
- Lines 0–4: Load Modules
- Lines 5–7: Define Constants and Globals
- Lines 8–9: Connect to the Database
- Lines 10–20: Start the Page
- Lines 21–22: Initialize Globals
- Lines 23–26: Handle a Submitted Ballot
- Lines 27–30: Generate a New Ballot
- Lines 31–34: Finish up
- Lines 40–60: get_globals Subroutine
- Lines 61–71: The generate_ballot Subroutine
- Lines 72–104: The voting_matrix Subroutine
- Lines 105–116: The registration_number Subroutine
- Lines 117–123: The vote Subroutine
- Lines 124–165: The validate Subroutine
- Lines 166–205: The enter_ballot Subroutine
- Lines 209–223: Utility Subroutines
- Tallying the Votes
- 42. Perl and Nuclear Weapons Don’t Mix
-
VII. Obfuscated Perl
- 43. The Zeroth Annual Obfuscated Perl Contest
- 44. The First Obfuscated Perl Contest
- 45. The Third Obfuscated Perl Contest
- 46. The Fourth Obfuscated Perl Contest
- 47. The Fifth Obfuscated Perl Contest
-
48. One-Liners
-
Useful One-Liners
- How to Use the Perl Debugger as a Command-Line Interpreter
- Picking Random Elements from an Array
- Evaluating Expressions Inside Double Quotes
- Little-Known Magic Scalar Variables
- A Demonstration of Perl/Tk Widgets
- Using Perl from Emacs
- Using Perl from vi
- Finding Substrings
- Simple Numeric Tests
- Adding a Long List of Numbers on the Command Line
- Printing Perl’s Include Path
- Extracting Unique Elements from a List
- Extracting, Sorting, and Printing Unique Words from a File
- Counting the Number of Lines in a File
- Counting Pod and Code Lines
- Separating the Header and Body of a Mail Message
- Sleeping for Less Than a Second
- Listing Installed Modules
- Another Way to List Installed Modules
- Preserving Case in a Substitution
- Finding the Longest Common Prefix and Suffix
- DeMorgan’s Rule
- Uuencoding Attachments
- When to Split and When to m//g
- Transposing a Two-Dimensional Array
- Suppressing Backquote Interpolation
- Stripping the Eighth Bits from a String
- Replacing Tabs with Spaces
- A Cheap Alarm Clock
- Primality Testing with a Regular Expression
- Factoring Numbers
- Little-Known Facts About qr
- Halving an Array
- Daylight Savings Time
- Tracking File Progress
- Timing Your Program
- Stringifying Data Structures
- Indenting a Here Document
- Printing All Capitalized Words
- Generating Randomly-Colored xterms
- Extracting PostScript from Windows-Generated PCL Files
- Graphing a Bent Torus with PDL
- Detecting Unbalanced Parentheses, Brackets, and Braces
- Extracting Parenthetical Contents
- Converting a GIF Image to an HTML Table
- Identifying CVS Files That Aren’t Up To Date
- Displaying All Perl’s Error Messages
- How to Patch Your Netscape Binary to Enable Strong Encryption
- A Little-Known Way to Create References
-
Not So Useful One-Liners
- Regular Expression Epigram
- Avoiding Asteroids with Perl
- Maze Generation
- The Pontifex Cryptosystem
- Perl in Sphere, the Movie
- An Absurd Way to Convert from Decimal to Binary
- Swatch Internet Time
- The Game of Life
- Ransom Notes
- Triggering the F00F Pentium Bug
- Magic Cards
- Perl Poem: down.pl
- Perl Poem: 143
- Perl Poem: If Dr. Seuss Were a Perl Programmer
- Perl Poem: Object-Oriented Perl
- Happy Birthday!
-
Useful One-Liners
- Index
- Colophon
- Copyright
Product information
- Title: Games, Diversions & Perl Culture
- Author(s):
- Release date: May 2003
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596003128
You might also like
book
Web, Graphics & Perl/Tk Programming
In its first five years of existence, The Perl Journal (TPJ) became the voice of the …
book
Using Gatsby and Netlify CMS: Build Blazing Fast JAMstack Apps Using Gatsby and Netlify CMS
Leverage the powerful new combination of Gatsby and Netlify CMS, a free open source content management …
book
Sams Teach Yourself Perl in 21 Days, Second Edition
Sams Teach Yourself Perl in 21 Days covers the basics of Perl in the first few …
book
Advanced Perl Programming: From Advanced to Expert
William "Bo" Rothwell's Advanced Perl Programming continues where his previous book left off, more or less, …