GGarramuno wrote: >1) Is there anything like Perl's continue block available? This is >not next, but a block that gets executed on each loop, before the >condition is tested, similar to the third block of a for loop does. >Ex: > i = 10 > while i > 0 > # do stuff > x = rand > if x > 0.5 next > p "not always get here" > continue > i -= 1 > end > >In the above example, i -= 1 gets executed at the end of the while >loop or if next is called. > > I like that feature... I'd never heard of that before! You could do something similar in Ruby like this: i = 10 while i > 0 begin x = rand next if x > 0.5 puts "#{i} not always get here" ensure i -= 1 end end -- Jamis Buck jgb3 / email.byu.edu ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'