Philip Newton schreef op 07 december 2001:
> On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige)
> wrote:
> 
> > *** Hole 4 (mid.pl) ***
> > --- Piers Cawley --------------------- 25
> > #!/usr/bin/perl -p0
> > $_=$1while/.(^.+)^/ms
> > --- Rick Delaney --------------------- 25
> > #!/usr/bin/perl -p0
> > $_=$1while/.^(.+)^/sm
> > --- Karsten Sperling ----------------- 25
> > #!/usr/bin/perl -p0
> > $_=$1while/.(^.+^)/sm
> > --- Eugene van der Pijll ------------- 25
> > #!/usr/bin/perl -p0
> > $_=$1while/.^(.+)^/ms
> > --- Keith C Ivey --------------------- 25
> > #! /usr/bin/perl -p0
> > $_=$1while/.(^.+)^/ms
> 
> Interesting how different people liked that ^'s in different places :)

Yes. And no one went for the variants with \n:

    #!/usr/bin/perl -p0
    $_=$1while/\n(.+)^/ms

Also, a majority of perl golfers prefer ms over sm.

Another important fact: the array @F is only used by the best golfers.
The lesser gods use @a and @_ almost exclusively.

One of my more interesting tries on this hole was

    int.5+($.-=2)/2||print for<>

Eugene

Reply via email to