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