Sharon Phillips wrote:
> try
> 
> example= %w[one two three cat dog cow table]
> puts example[rand(example.size)]
> 
> Cheers,
> Dave

Another example would be:

example= %w[one two three cat dog cow table].sort_by { rand }
example.each { |string|
  puts string
}

that will print all in random order

my regards

-- 
Posted via http://www.ruby-forum.com/.