http://www.perlmonks.org?node_id=129151

This would have a very specific (read: small) audience, so it is probably not a viable "book" in the usual sense of the word, but I'd be happy to devote some of my graciously granted japhy.perlmonk.org space to a Perl-golfer's guide. The phrase I used on the "Fun With Perl" mailing list was "I'd appreciate it if [everyone] showed what drivers, putters, and wedges they used to squeeze every last yard out of Perl."

With golf being a popular pastime of seasoned and apprentice Perl programmers alike, it only seems fair that the Tiger's and Nicklaus' among us should impart some of their knowledge of the shortcuts in Perl, helping less experienced golfers avoid the sandtraps of routine programming. Think of it as a pro-am.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Book Idea: The Golfer's Handbook
by Masem (Monsignor) on Dec 04, 2001 at 00:04 UTC
    This is a great idea, and we could easily sell the idea to O'Reilly. There's already the perfect animal for the cover: the Gopher ;-).

    You could also demonstrate some of the simplications with examples that we've already posted here (making sure that if you really do publish it, to get permissions for those that participated).

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

Re: Book Idea: The Golfer's Handbook
by footpad (Abbot) on Dec 04, 2001 at 00:09 UTC

    This would be educational; I think you should call it The Duffer's Guide to Perl Golf.

    Naturally, there would be companion volumes:

    • The Duffer's Guide to Perl Obfuscation

    • The Duffer's Guide to Perl Idioms1

    • The Duffer's Guide to Perl Modules

    • The Duffer's Guide to Useful Perl Regular Expressions....(wait, you're already writing that).

    ...and so on...

    --f (being only slightly facetious)

    1 - Yes, I'm well aware of the, um, er...Pearl book, but this would be geared for those of us still learning which clubs to swing and when.

      How about a book, comprised of many units, titled "The Perl Programmer at Play" or "The Playful Perl Programmer"?

      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Re: Book Idea: The Golfer's Handbook
by VSarkiss (Monsignor) on Dec 04, 2001 at 01:53 UTC

    Sounds like fun. But you're right that it would have a small audience, so how about broadening the material? Maybe "Perl Golf" would be a chapter in a larger book called, say, "Perl for Sheer Fun". Other chapters could be things like

    • Obfuscation (get Erudil and BooK to contribute their code!)
    • The Acme:: modules.
    • Poetry (? Dunno about this: I don't think there's much to be learned here.)
    • Writing quines, by means fair and foul (I'm thinking of World's worst Perl quine.)
    I'm sure there's more stuff in the same vein.

      How about games?
    • Games::Rezrov and a few other Games:: (the specific ones not generic classes?)
    • Lingua::Romana::Perligata and some other Lingua::*?
    • var'aq Klingon language programming (currently) implemented in perl?
    • Text::FIGlet not to toot my own horn
    • And I'm sure there are a few others tucked away...

      As for poems Coy might be a good thing for that.

      --
      perl -p -e "s/(?:\w);([st])/'\$1/mg"

      Although I don't know what the Acme modules are (and believe me, I'm going to look them up after this post), the others are definite must haves. ++'ng your node simply didn't express my approval enough. ;)

      elbieelbieelbie

Re: Book Idea: The Golfer's Handbook
by belg4mit (Prior) on Dec 04, 2001 at 00:22 UTC
    I would imagine -p, $\, and $/ can come in quite handy? Of course in my last game I had a handicap of 80...

    --
    perl -p -e "s/(?:\w);([st])/'\$1/mg"