develooper Front page | perl.fwp | Postings from December 2001

PGA (Perl Golfers' Association)

Thread Next
From:
Jeff 'japhy' Pinyan
Date:
December 3, 2001 10:17
Subject:
PGA (Perl Golfers' Association)
Message ID:
Pine.GSO.4.21.0112031257510.5335-100000@crusoe.crusoe.net
I think the golfers among us should pool our efforts (after the rowdy,
cut-throat competition ends, of course!) to amass a list of common -- or
would that be uncommon? -- golfing techniques.  While participating in a
round on PerlMonks.org, I used

  rand>$f?Y:X

instead of the error-producing

  rand<$f?X:Y

which must be rewritten as

  rand()<$f?X:Y

So I save two characters.  Of course, the command-line options come into
play and all.

I'd appreciate it if all the contestants of this competition showed what
drivers, putters, and wedges they used to squeeze every last yard out of
Perl.  I've got a trick or two up my sleeve.

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About