RE: YN golf

"Allen, Greg" <[email protected]> Tue, 1 Apr 2008 11:37:02 +0100
Newsgroups gmane.comp.lang.perl.fun
Message-ID <F5037BD22D1BC94A82CDC6B5E966C1E508C75E0F@LOPETS1EXMS001.leh.lbcorp.lehman.com>
Magoo=21=20

-----Original Message-----
From: John W. Krahn =5Bmailto:krahnj=40telus.net=5D=20
Sent: Tuesday, April 01, 2008 7:17 AM
To: fwp=40perl.org
Subject: Re: YN golf

Uri Guttman wrote:
> someone posted (and it wasn't homework) for an easy way to get all
> possible combos of YN (5 chars so 32 answers). he got some basic
> multiline answers but i think it makes for a great golf problem.
>=20
> here is my first pass which i am sure can be easily bested. i haven't
> even squeezed out the white spaces but it does work.
>=20
> golf away=21
>=20
> uri
>=20
> perl -le 'print join =22=5Cn=22, map =7Btr/01/NY/; =24_=7D map unpack( =
=22b5=22, chr),
0 .. 31'

   perl -le'y/01/NY/&&print,for+map+unpack(b5,chr),0..31'



John
--=20
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - -

This message is intended only for the personal and confidential use of the =
designated recipient(s) named above.  If you are not the intended =
recipient of this message you are hereby notified that any review, =
dissemination, distribution or copying of this message is strictly =
prohibited.  This communication is for information purposes only and =
should not be regarded as an offer to sell or as a solicitation of an =
offer to buy any financial product, an official confirmation of any =
transaction, or as an official statement of Lehman Brothers.  Email =
transmission cannot be guaranteed to be secure or error-free.  Therefore, =
we do not represent that this information is complete or accurate and it =
should not be relied upon as such.  All information is subject to change =
without notice.