Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

VII. Obfuscated Perl > 48. One-Liners

Chapter 48. One-Liners

Jon Orwant

I once subscribed to the newsprint version of The Onion, a humor newspaper better known for their web site (www.theonion.com). On the Web, of course, The Onion doesn’t have to worry much about layout: their articles can be as long or as short as necessary. But on paper, they need to fill every square inch on every page with either content or ads. When room is left over, they insert a dummy article consisting of the phrase “Passers-by were amazed by the unusually large amounts of blood” repeated over and over. There were times when I wished I had done the same with TPJ.

Up until TPJ #13, I did all The Perl Journal ’s layout myself, and I almost always deferred it until a few days before printing. Magazines and newspapers typically lay out advertisements first, and flow the text around them. In contrast, I was always tweaking the articles up until the last minute, sometimes changing the length by enough that I ended up with substantial empty space on the page. Starting with TPJ #7, I began to amass a collection of “Perl One-Liners” for sprinkling around the magazine whenever I needed to fill a column-inch or two. Very few of them were actually one line, but the name stuck, and I present 65 of them here for your use and amusement.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint