>>>>> "m" == markus jais <mjais / web.de> writes: m> old = ARGV[1] m> new = ARGV[2] This is the same than perl (it begin at 0) old = ARGV[0] new = ARGV[1] m> dir = Dir.new("."); m> while line = dir.read m> next if line == "." or line == ".." m> puts line m> line.sub!(/old/, new) #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Error You must write /#{old}/ to expand the variable 'old' otherwise ruby think that it's the string "old" m> puts line m> end Guy Decoux