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

Re: this must be golfable

Thread Previous | Thread Next
From:
Mtv Europe
Date:
August 14, 2002 05:07
Subject:
Re: this must be golfable
Message ID:
Xns926AA0AD6568mtve212166108@64.70.54.95
Hello Piers!

pdcawley@bofh.org.uk (Piers Cawley) wrote:
>>     -p $_=pack B8 x!!y/|.//d,$_          # eugene
>>     -p $_=y/|.//d?pack B8,$_:""          # mtve
>       
>      -p $_=pack y/|.//d?B8:"",$_
> 
> Hmmm... can't seem to get under Eugene & MTVe's scores. It feels like
> there ought to be a way, but nothing's springing to mind.

yep, there might be a limit at 27

-pX $_=pack!!y/|.//d&&B8,$_
-p $_=pack B.y/|.//d*8/3,$_
-p $_=pack"\23"^y/|.//d.B8,$_

(last two assumes strict input with exactly three '|' or '.')

---
Mtv Europe

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