From: dblack@... Date: 2006-04-22T08:04:50+09:00 Subject: Re: Text Munger (#76) Hi -- On Sat, 22 Apr 2006, PerlyGates wrote: >> i went golfing and got one line : 96 chars > > For reference: > >
perl -pe
> 's/(?<=\w)\w+(?=\w)/join"",sort{int(rand(3)-2)}split"",$&/eg'
>
> (65 characters)
But \w includes underscore. I think punctuation is supposed to remain
unscrambled, isn't it? And numbers likewise.
David
--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)
"Ruby for Rails" PDF now on sale! http://www.manning.com/black
Paper version coming in early May!