Just another quick question regarding flow control.

What variable can I refer to, and what method do I use
to create a while loop so that only x amount of lines
are shown at once from a file? 

This is how I have been approaching it, its obviously
not working, and I'm still not up to speed at working
out how to use methods based on the online reference
details only.

=====
if File.exists? Log_File
  lines = File.open(Log_File).readlines
  lines.each_with_index do |line, index|
     index % 2 == 0 ? color = "#dddddd" :
 color="#cccccc"

	while index <= 50

	    puts "<tr bgcolor=\"#{color}\">\n 
 <td>#{index}</td>\n  <td>#{line}</td>"    
	    puts "</tr>"
      
       end

   end
=====


Am I even approaching this the correct way?  Or should
this be handled once step before with a grep
statement?

Thanks again.
Tristan


		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com