chen li wrote:
> Hi all,
>
> I want to create an array as following:
> a4=['name 1','name 2'...'name 20'].

a4 = (1..20).collect{|n| "name #{n}"}

Cheers,
Antonio
--
http://antoniocangiano.com
Zen and the Art of Ruby Programming