Jayson Williams
10/14/2007 1:57:00 AM
Hi all,
Is there a way to terminate an each_line iteration before it iterates
through every line? For instance:
file = open(url)
file.each_line{|line|
found = true if if line.include?('string')
break if found == true
}
Is it possible to to break out of the each_line statement if found is true?
Thanks
Jayson