From: James Edward Gray II Date: 2006-04-24T01:44:33+09:00 Subject: Re: [QUIZ] Text Munger (#76) On Apr 23, 2006, at 4:45 AM, Himadri Choudhury wrote: > print ARGF.read.gsub!(/\B[a-z]+\B/) {|x| > x.length.times {|i| > j = rand(i+1) > x[j], x[i] = x[i] , x[j] > } > x > } > > Basically, this is an implementation of scrambling that uses swaps. I > remember this method for scrambling from way back, but I can't seem > to find > a good reference for it at the moment. http://www.nist.gov/dads/HTML/fisherYatesShuffle.html James Edward Gray II