From: James Gray Date: 2008-02-28T08:31:47+09:00 Subject: Re: String interpolation method? On Feb 27, 2008, at 4:53 PM, John Carter wrote: > Ok, I'm being stupid probably... > > But I can't spot a method to do string interpolation. > > I have a string... > > a = 'bra#{c}ket' > > The variable c isn't available at the stage of setting that up. You want a templating solution, like the ERb code that ships with Ruby: #!/usr/bin/env ruby -wKU require "erb" template = ERB.new("bra<%= c %>ket") # and later... c = "c" p template.result __END__ Hope that helps. James Edward Gray II