RE: [Wtr-general] Inserting variable name in string

2005-07-27 Thread Paul Rogers
You're close! New_string = 'abcdef#{var1}jklmnop' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Torres, Ben (HQP) Sent: 27 July 2005 11:36 To: wtr-general@rubyforge.org Subject: [Wtr-general] Inserting variable name in string Right now, I am doing

RE: [Wtr-general] Inserting variable name in string

2005-07-27 Thread Zeljko Filipin
, 2005 7:43 PM To: wtr-general@rubyforge.org Subject: RE: [Wtr-general] Inserting variable name in string You're close! New_string = 'abcdef#{var1}jklmnop' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Torres, Ben (HQP) Sent: 27 July 2005 11:36 To: wtr

Re: [Wtr-general] Inserting variable name in string

2005-07-27 Thread Angrez Singh
Hi, Try this.. var1 = 'ghi' var1 = 'ghi' new_string = abcdef#{var1}jklmnop I think you forgot to put the # before the braces and also double quoted string is must for this kind of substitution. Regards, Angrez On Wed, 27 Jul 2005 Torres,Ben(HQP) wrote : Right now, I am doing this: var1 =

Re: [Wtr-general] Inserting variable name in string

2005-07-27 Thread Angrez Singh
Hi, Try this.. var1 = 'ghi' new_string = abcdef#{var1}jklmnop I think you forgot to put the # before the braces and also double quoted string is must for this kind of substitution. Regards, Angrez On Wed, 27 Jul 2005 Torres,Ben(HQP) wrote : Right now, I am doing this: var1 = 'ghi'