From: Elliot Temple Date: 2006-06-03T03:49:30+09:00 Subject: Re: This is brain dead, but is it stupid? On Jun 2, 2006, at 12:27 AM, Jeff Pritchard wrote: > @barString = " \"replace_with_width\" > height=\"replace_with_height\">\n" > > Any coding comments welcome. I don't think the replace technique is very elegant. One thing you can do instead is make a string with %s for holes: irb(main):001:0> x = "1 %s 3" => "1 %s 3" irb(main):003:0> x %2 => "1 2 3" also instead of escaping lots of double quotes by hand you can using a different way to surround the string. see pickaxe page 320 irb(main):007:0> %Q-a "b" c- => "a \"b\" c" irb(main):008:0> %[dog "cat" rat] => "dog \"cat\" rat" -- Elliot Temple http://www.curi.us/blog/