Re: YN golf
Zed Lopez <[email protected]> Mon, 31 Mar 2008 16:22:08 -0700
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Mar 31, 2008 at 05:50:24PM -0500, Uri Guttman wrote:
> perl -le 'print join "\n", map {tr/01/NY/; $_} map unpack( "b5", chr), 0 .. 31'
Also, I'm sure, easily bested:
perl -e 'for(0..31){$_=sprintf"%05b\n",$_;y/01/YN/;print}
marginally shorter not-to-hoyle hybrid:
seq 0 31|perl -pe '$_=sprintf"%05b\n",$_;y/01/YN/'
--
zed at-sign apricot dot com http://www.MemeMachineGo.com/
Zed Lopez PO Box 12546 Berkeley CA 94712