On Wed, Feb 10, 2010 at 4:23 PM, Sak .. <sak / proxectods.org> wrote: > I can write a equivalent code in ruby but not (by far) as efficient as > perl. Someone knows how can I change the separator for iterate the stdin > in ruby? Ruby has also $/ among its global variables. The methods #gets and #readline take it into account. Those methods and #each also accept a separator as an optional argument. In Ruby 1.9 they additionally accept an integer, that's the same as setting $/ to a reference to an integer in Perl.