Re: Now, why didn't I try that...

2002-04-08 Thread Lars Henrik Mathiesen
> From: Peter Makholm <[EMAIL PROTECTED]> > Date: Mon, 08 Apr 2002 13:08:07 +0200 > > Lars Henrik Mathiesen <[EMAIL PROTECTED]> writes: > > > map!s/$ > > ^/ /m|//||print,sort%%for map$%{_,sort/./g}.=$_,sort<> > > > > If the unnecessary $ at the end of line 1 hadn't snuck in, it would > > Argh.

Re: Now, why didn't I try that...

2002-04-08 Thread Peter Makholm
Adam Spiers <[EMAIL PROTECTED]> writes: > At a guess, because Perl parses that as: > > s/$\ n/ /mx Of course. What I meant was s/$ / /m, which doesn get interpreted as a variabel. My unsucessfull 61.43 solutions has: xyzzy% cat anagrams.pl #!perl map!s/$ / /m|//||print,sort%%for map$%{_,sor

Re: Now, why didn't I try that...

2002-04-08 Thread Adam Spiers
Peter Makholm ([EMAIL PROTECTED]) wrote: > Lars Henrik Mathiesen <[EMAIL PROTECTED]> writes: > > > map!s/$ > > ^/ /m|//||print,sort%%for map$%{_,sort/./g}.=$_,sort<> > > > > If the unnecessary $ at the end of line 1 hadn't snuck in, it would > > Argh. I wasn't really awake at the moment. > > Ca

Re: Now, why didn't I try that...

2002-04-08 Thread Peter Makholm
Lars Henrik Mathiesen <[EMAIL PROTECTED]> writes: > map!s/$ > ^/ /m|//||print,sort%%for map$%{_,sort/./g}.=$_,sort<> > > If the unnecessary $ at the end of line 1 hadn't snuck in, it would Argh. I wasn't really awake at the moment. Can anyone explain to me why 's/\n^/ /m' seems to work but s/$\

Re: Now, why didn't I try that...

2002-04-08 Thread Lars Henrik Mathiesen
> From: "Dave Hoover" <[EMAIL PROTECTED]> > Date: Sun, 7 Apr 2002 20:50:21 -0500 > > Lars wrote: > > After looking at the postmortem, I don't quite understand why BoB > > didn't come up with something like this for 61.44: > > > > map!s/ > > ^/ /m|//||print,sort%/for map$/{_,sort/./g}.=$_,sort<> >

Re: Now, why didn't I try that...

2002-04-08 Thread Peter Makholm
Lars Henrik Mathiesen <[EMAIL PROTECTED]> writes: > map!s/ > ^/ /m|//||print,sort%/for map$/{_,sort/./g}.=$_,sort<> I actually submitted a second solution with a %%-hash and you changes in the substitution bringing the score down to 61.44. But Dave was referee at the moment and I really wasn't a

Re: Now, why didn't I try that...

2002-04-07 Thread Keith C. Ivey
Lars Henrik Mathiesen <[EMAIL PROTECTED]> wrote: > After looking at the postmortem, I don't quite understand why > BoB didn't come up with something like this for 61.44: > > map!s/ > ^/ /m|//||print,sort%/for map$/{_,sort/./g}.=$_,sort<> > > Trying the various punctuation characters as names fo

RE: Now, why didn't I try that...

2002-04-07 Thread Dave Hoover
Lars wrote: > After looking at the postmortem, I don't quite understand why BoB > didn't come up with something like this for 61.44: > > map!s/ > ^/ /m|//||print,sort%/for map$/{_,sort/./g}.=$_,sort<> Because BoB is very tired. We had 687 solutions submitted by 128 golfers in the last 7 days, an

Now, why didn't I try that...

2002-04-07 Thread Lars Henrik Mathiesen
After looking at the postmortem, I don't quite understand why BoB didn't come up with something like this for 61.44: map!s/ ^/ /m|//||print,sort%/for map$/{_,sort/./g}.=$_,sort<> Trying the various punctuation characters as names for the hash was actually going to be my next trick, if I was desp