develooper Front page | perl.golf | Postings from January 2007

Re: simple golf for fun

Thread Previous | Thread Next
From:
Phil Carmody
Date:
January 16, 2007 11:00
Subject:
Re: simple golf for fun
Message ID:
173192.55140.qm@web25404.mail.ukl.yahoo.com
In response to Phil Carmody <thefatphil@yahoo.co.uk> saying:
> > The simple version of the task is to verify that each line of a file is the
> > insertion of one character somewhere (maybe at the start or the end) into
> > the prior line.

--- Ton Hospel <perl-golf@ton.iguana.be> wrote:
<<<

-p0 $_ x=/^((.*)(.*)
(?=\2.\3
|$))*$/

>>>

Nice indeed. But would this count as a -4 Magoo?

-p0 s/^((.*)(.*)
(?=\2.\3
|$))*$//


Phil



()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]


 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About