Kev Jackson wrote: > PS - I managed to get rid of all the evals hooray for me! Good work, now just get rid of those "#{fully interpolated}" strings and extraneous to_s :) > Which of the following is considered better style? > > $ie.text_field(args[0], > $test_data[args[1].to_s]["#{args[2]}_fld"]).value=$test_data[args[1].to_s][args[2].to_s] > > $ie.text_field(args[0], > $test_data["#{args[1]}"]["#{args[2]}_fld"]).value=$test_data["#{args[1]}"]["#{args[2]}"] It's nice to fit a line on one line. How's this? test = $test_data[args[1]] $ie.text_field(args[0], test[args[2] + "_fld"]).value = test[args[2]] > ie is it better to use args[1].to_s or "#{args[1]}" to_s, but if you control your $test_data and args, and can't imagine how args[1] or args[2] could be anything other than strings, there's no need for a cast at all. > My current thinking is that "#{}" should be used when concatenating > strings together with values (or interpolating), where as .to_s should be > used when you want the string representation of an object. I don't like using interpolation when the stuff I'm interpolating is bigger than the literal part of the string. Cheers, Dave