>p [*"a".."ff"]
David Black's solution above looks like the best for Ruby (hey, he
wrote the Ruby for Rails book :-)
If Ruby didn't have that ability to enumerate from "a" to "ff" (I know
it does), this one would also work (in Ruby as well as in other
languages like Python, with suitable changes for their different
syntax):
labels = []
["a".."z"].each { |c| labels << c }
["a".."z"].each do |c|
["a".."z"].each { |c2| labels << (c + c2) }
end
# Now do whatever you want with the array 'labels'.]
( I'm not at my PC right now, so can't check if its quite right. )
Vasudev Ram
Dancing Bison Enterprises
http://www.dancingbison.com