On Thursday 18 September 2003 17:06, Sven Neuhaus wrote:
> On Thu, Sep 18, 2003 at 08:44:45AM +0100, Etienne Grossmann wrote:
> > PS : Ok, ok, the ublmaecsrnd sprict is :
> >
> > perl -pe 'sub r{join"",map chop,sort
> > map{rand().$_}shift=~/(.)/g};s/\b(\w)(\w*)(\w)\b/$1.r($2).$3/eg'
>
> Slhgit iomeevmnrpts
> perl -pe'sub r{join"",map chop,sort map
> rand.$_,split//,pop}s/(?<=\w)\w+(?=\w)/r($&)/eg' Tehre must be a
> beettr way...
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.
-- fxn