Hi Mike,
Your suggestions worked fine, but eval has sprung another leak on me,
and I haven't worked out quite what it is yet.
Using eval on this problem was not such a good idea after all ;-[[
[1] pry(main)> puts "xyz#abc".gsub("#","\\\\043");
xyz\043abc
[2] pry(main)> puts "xyz#abc".gsub("#") { '\\043' };
xyz\043abc

-- 
Posted via http://www.ruby-forum.com/.