From: paulvallance@... (Paul Vallance) Date: 2002-01-01T05:23:14+09:00 Subject: [ruby-talk:29888] string variables within strings Dear Ruby experts, I have a problem with adding the contents of string variables into another string, which I'm sending to a TCP Server. I think the following syntax should work..... t.send("/gettext( #{v} ,#{v1} ,0)\n",0) where v is a variable containing the string 720 and v1 is a variable containing the string 735 /gettext is a command recognised by my TCP Server whose sysntax is... /gettext(start character position, end character position, plain text mode) so when sending... t.send("/gettext( #{v} ,#{v1} ,0)\n",0) My TCP server responds saying that there are not enough parameters! However, if I send this instead... tsend("/gettext(720,735,0)\n",0) my TCP server responds correctly. all I'm doing here is replacing #{v} with its contents and #{v1} with its contents. Any help would be very much appreciated, Have a great new year's celebration too ! Regards Paul