Re: Semcarlbd letrtes sepur! (Scrambled letters super!)
Hi all, On Thu, Sep 18, 2003 at 05:54:15PM +0200, Xavier Noria wrote: [snip] # # My current favourite is # # -p s!\B\w+\B!join,sort{rand 2}$=~/./g!ge # [snip] This is very nice (I didn't know about \B either); how randomly does that scramble? I'm sure there's a thread somewhere on that. Cheers, Etienne -- Etienne Grossmann -- http://www.isr.ist.utl.pt/~etienne
Re: perl syntax oddity
Selon Yitzchak Scott-Thoennes [EMAIL PROTECTED]: So is it unintentional that you can localize through an expression resulting in a glob? Er... I'd say it's correct but only half intentional. The full story is here : http://bugs6.perl.org/rt2/Ticket/Display.html?id=21321
Re: Semcarlbd letrtes sepur! (Scrambled letters super!)
On Thursday 18 September 2003 17:27, Xavier Noria wrote: My current favourite is -p s!\B\w+\B!join,sort{rand 2}$=~/./g!ge but I am sure any serious golfer can shorten that substantially. I am sorry for the duplicate, this was sent yesterday from an address which is not subscribed to the list. -- fxn
RE: Semcarlbd letrtes sepur! (Scrambled letters super!)
In which case I can beat: -pX s#\B\w+\B#join,map chop,sort map{rand.$_}$=~/./g#eg With: -p s#\B\w+\B#join,values%{{map{rand,$_}$=~/./g}}#eg Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 2:11 PM To: [EMAIL PROTECTED] Subject: Re: Semcarlbd letrtes sepur! (Scrambled letters super!) In article [EMAIL PROTECTED], Etienne Grossmann [EMAIL PROTECTED] writes: Hi all, On Thu, Sep 18, 2003 at 05:54:15PM +0200, Xavier Noria wrote: [snip] # # My current favourite is # # -p s!\B\w+\B!join,sort{rand 2}$=~/./g!ge # [snip] This is very nice (I didn't know about \B either); how randomly does that scramble? I'm sure there's a thread somewhere on that. Not very. The sort{rand 2} trick has been rejected in golfs before. -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Re: Semcarlbd letrtes sepur! (Scrambled letters super!)
Ton == Ton Hospel [EMAIL PROTECTED] writes: This is very nice (I didn't know about \B either); how randomly does that scramble? I'm sure there's a thread somewhere on that. Ton Not very. The sort{rand 2} trick has been rejected in golfs before. I don't know about current perl versions, but in older perl versions, that'd lose elements, double up on elements, or even coredump. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!