From: ts Date: 2002-04-06T00:05:15+09:00 Subject: Re: socket question >>>>> "M" == Markus Jais writes: M> my $str = <$socket>; scalar context : you read *only one* line M> t.readlines.each do |line| M> puts line M> end return an array, trying to read more than one line M> while t.gets M> puts $_ M> end same here : you are trying to read more than one line, unlike the p script Guy Decoux