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

Re: solutions

Thread Previous | Thread Next
Jason Henry Parker
January 29, 2002 04:14
Re: solutions
Message ID:
Matthew Byng-Maddick <> writes:

> On Mon, Jan 28, 2002 at 11:14:00PM -0500, Keith C. Ivey wrote:
> > But I was glad to see in the results several versions (by me 
> > and others) of the lovely
> >   -ln 1&($.|y|o|||y|e|||y|u|||y|a|||y|i|||y|y|||y|||c)||print
> Indeed, I thought that was very beautiful when I discovered it.

Hmm.  I tend to leave the regex-like operators delimited by slashes,
so I didn't get to appreciate the true beauty of this myself (I'm sure
I wrote exactly that pretty early on).

> It just didn't occur to me to use the $_ x=... trick, by which I'm
> still stunned.

I found it by going back through the analyses of the previous
tournament's winners.  After that, the score dropped from the mid-80s
to 77 in about a day.  The other key was using a /./g match on
| The way you tell your story        |
| With no tears for yourself                  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About