> arr.map! {|line| line.split("\t")[2]}
> arr.each_with_index do |field, i|
>   if field
>     puts "Found field #{field} in line #{i}"
>   else
>     puts "No third field in line #{i}"
>   end
> end
> 

thanks alot!

if i want to check that fields value how do i check it like it prints it 
out to the screen but i want to use something like this

if field = "example 3"
puts "Found field #{field} in line #{i}"
end
but its still just spitting out each line

I dont want to print each line that has a third field just the specic 
one



-- 
Posted via http://www.ruby-forum.com/.