develooper Front page | perl.fwp | Postings from February 2002

Re: TPR0 Final Results

Thread Previous | Thread Next
From:
Andrew.Savige
Date:
February 19, 2002 14:41
Subject:
Re: TPR0 Final Results
Message ID:
694BB7191495D51183A9005004C0B05452DC2A@ir-exchange-srv.ir.com.au
Stephen Turner schreef op 20 februari 2002:
> I'm still interested in seeing a real solution less than 46.
> But maybe there isn't one.

Since we have had a positive sighting of Eugene whittling at the
RC4 solution, I doubt that it is possible. ;-)

I had visions of reliving Eugene's celebrated reverse in Santa's
game by using the $\ variable, but I can't get it below 48.
It would be a winner were it not for the newline requirement.

Since variety is the spice of life, I present 5 permutations
of Spiff's solution using various special variables. If there
happened to be a Perl built-in array with value ("","\n"), the
last one would be 45.

spiff 46:
map$.=36*$.-55+/\d/*7+ord,pop=~/./g;print$..$/

46:
map$,=36*$,-55+/\d/*7+ord,pop=~/./g;print"",$/

41 (but, alas, not new-line terminated):
map$\=36*$\-55+/\d/*7+ord,pop=~/./g;print

48:
map$\=36*$\-55+/\d/*7+ord,pop=~/./g;$\.=$/;print

56:
@a=("",$/);map$"=36*$"-55+/\d/*7+ord,pop=~/./g;print"@a"

/-\ndrew

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