From: Logan Capaldo Date: 2007-10-08T22:13:13+09:00 Subject: Re: Can I do this perl code the same in ruby? On 10/7/07, kazaam wrote: > > Arrays of _what_ do you think? Maybe array's of sockets? Actually > > array's of any instance of IO. > Yes you have been right, also if this looks terrible now because: myselec = IO.select([server]) fills myselec with [[socket]] so with 2 Arrays I have to extract with myselec[0][0]...somehow perl looks more intuitive in this case. > generally we use select thusly: to_read, to_write, erroed = IO.select([server]) Again you have only one socket apparently, as Robert points out you don't need to use select. select is generally for multiplexing IO, ie you are working with multiple sockets. So it is going to seem awkward for when you are working with just one.