develooper Front page | perl.golf | Postings from August 2002

Re: First posts of some famous golfers

Thread Previous | Thread Next
From:
Stefan `Sec` Zehl
Date:
August 27, 2002 20:27
Subject:
Re: First posts of some famous golfers
Message ID:
20020828032704.GB3384@matrix.42.org
Hi,

I knew, I should've kept my mouth shut, because
on Tue, Aug 27, 2002 at 10:21:36PM -0400, Keith C. Ivey wrote:
> You don't get off that easily.  Here you are, 1997-06-24, in
> de.comp.security using Perl to solve a puzzle about finding
> someone's bankcard PINs:
> http://groups.google.com/groups?selm=slrn5qvq9g.ap5.sec%40matrix.42.org

Ugh. I totally forgot about that. Must've repressed that memory %)
That is one awfull piece of perl. Doing tr external. Unnecessarily using
C-Style for. Using split to @_. And even the algorithm for checking for
double letters is very unperlish.

Hmm. Come to think of it, that[0] would make a nice golf hole, wouldn't
it?

What about another open round on that as a quick training session just
before the new TPR() starts?

CU,
    Sec

[0] Finding (and printing) all words (from stdin) with all of a set of
    given letters (on the command line, for simplicity) appearing once
    in the first 10 characters ot the word, and containing no duplicates
    in the first 10 characters.
-- 
perl -nle 'print "$_ is divisible by 5" if (unpack("B*",reverse pack("L",$_))=~
/^0*(1(10)*(0|11)(01*0(01)*(00|1))*10*)+$/)'

Thread Previous | 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