From: kinfe0@... (Kinfe) Date: 2002-01-07T00:16:05+09:00 Subject: [ruby-talk:30350] Re: loop control problem. Jim Freeze wrote in message news:<20020105212056.A81928@freebsdportal.com>... > On Sun, Jan 06, 2002 at 10:14:57AM +0900, Kinfe wrote: > > I think my earlier post didn't go through, so here is a repost. > > > > cow.each do |c| > > a=c.split > > pig.each do |p| > > b=p.split > > b.each do |b| > ------------------^ # might want to choose another variable instead of b. > > if a[4] >= b[4] > > break > > end > > > > # at this point, I'll have a new cow.each record but I don't > > # new pig.each record, another word, I would like to cow loop > > # to continue without advancing the pig loop. Can it be done? > > Try 'next'. > > > > > end > > end > > end > > > > Thanks. > > > > Kanfe Thanks Jim and Yohanes, I'll try both suggestions. Kinfe