Dear ruby gurus,

I would like to put the string returned via the TCP Server to my
rubyscript into a variable (@readdata)  and strip the words "TCP/XT
OK" from the end of it and update the variable, then use the contents
of this variable in a following send... something like below... . I
thought str.gsub would do it, ie replace the substring "TCP/XT OK"
with an empty string (though I'm sure "" is not right syntax for an
empty string).


#!/usr/bin/env ruby

require 'socket'
t = TCPSocket.new("192.168.0.178",13)

t.send("/firstbox\n",0)
@readdata = t.recv(30)
puts @readdata // which is "123456789 TCP/XT OK"
v = @readdata
v.str.gsub!(TCP//XT OK,"" ) 
t.send("/ispicbox(#v )\n",0)

hope someone can help,

regards

Paul