--- Juho Snellman <[EMAIL PROTECTED]> wrote:
> Phil Carmody <[EMAIL PROTECTED]> writes:
> > -p0 s/^((.*)(.*)
> > (?=\2.\3
> > |$))*$//
> 
> Assuming the last line is also newline-terminated:

Fair assumption

> -n0 a//^((.*)(.*
> )(?=\2.\3|$))*$/

Kiitos, Juho.

That's gone beyond my perl ken! Was this the expected failure outcome?

$ echo -e "1\n12\n173\n" | perl -n0 -e 'a//^((.*)(.*
)(?=\2.\3|$))*$/'
Illegal division by zero at -e line 1, <> chunk 1.

Unfortunately it looks like it fails to even finish my 2400-line file - what's
its Big-Oh? :

$ time perl -n0 -e 'a//^((.*)(.*
)(?=\2.\3|$))*$/' < delsieve.log

<fx: kuolemanhiljaisuus />

Thanks for the interesting, and horribly short, contribution though.
Phil





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

[stolen with permission from Daniel B. Cristofani]


 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

Reply via email to