Daniel Berger wrote:

> For example, my_template_XXXXXX would become my_template_T$#z%Ya

How about this:

def getRandLetter
  65 + rand(26)
end

def randomFileNameSuffix (baseFileName, numberOfRandomchars)
  numberOfRandomchars.times { baseFileName << getRandLetter  }
  baseFileName
end

fn = randomFileNameSuffix("foo_", 7)
puts fn
-- 
Posted via http://www.ruby-forum.com/.