From: Matthew PATTISON Date: 2002-05-01T01:27:19+09:00 Subject: Sockets problem Hi, I'm having problems writing a ruby script that connects, via a socket, to a program which seems to use a windows style line separator (e.g. "\r\f" or something like that) instead of "\n" when communicating over the socket. The code: socket.print "a string\r\f" seems to work OK to get data from the ruby script to the application (this mostly solves the problem I was having in [ruby-talk:36784] http://www.ruby-talk.org/36784 but some funny stuff still happens when calling: socket.gets e.g. Ruby seems to wait a long time before gets() returns, even when there's stuff waiting on the socket. I've tried setting $/ = "\r\f" but that didn't work - my script just hung. Any ideas? Is $/ the right variable to set so that socket.gets will look for a different line separator? Matt