Eugene van der Pijll <[EMAIL PROTECTED]> writes:
> 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.
Heh. I bounced between @a and @F (tried the -anlF trick, it didn't
work). And then I found the regex.
--
Piers
"It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite."
-- Jane Austen?