From: 7stud -- Date: 2007-10-09T02:06:24+09:00 Subject: Re: optparse and required switches A little change here: ARGV.each do |word| if word[0, 2] == '-t' found_opt_t = true break #<---if found option, no reason to continue loop end end -- Posted via http://www.ruby-forum.com/.