On Fri Jun 16, 2006 at 20:00:29 +1000, O Plameras wrote:
>Matthew Palmer wrote:
>
>>Reading the Fine Manual, we discover that your code probably won't work
>>anyway:
>
>Yes, the two yield exactly the same results as shown below.
>
>#cat t1.rb
>#!/usr/bin/env ruby
>puts $stdin.readline while not $stdin.eof
>
>#cat t2.rb
>#!/usr/bin/env ruby
>puts $stdin.readlines while not $stdin.eof

I think the key difference here is the number of times the loop is
execute. That is going to be different, and understanding that
difference is probably extremely important to those in the learning
Ruby SIG.

Cheers,

Benno
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to