From: cyberco Date: 2005-11-27T21:42:28+09:00 Subject: Re: recursion The recursive solution I found is: __________________________ def addChar(str, level) if level == 2 ('a'..'z').each {|c| p str + c @file << str + c + ' ' } else ('a'..'z').each {|c| addChar(str + c, level + 1) } end end __________________________ I'm merely posting it here for future reference. Erik's solution ('aaa'..'zzz').to_a is ofcourse much more usable and elegant :)