On Thu, Dec 20, 2001 at 05:00:46PM -0500, Hanson, Robert wrote: > If you use "redo" while in that loop it will reset it and start over
Just a bit of clarification: redo will not cause the loop to reset and start over. redo causes the current loop block to execute again, without re-evaluating the looping condition. For example: foreach my $question (@yesno_questions) { print "$question? (yes/no) "; chomp(my $answer = <STDIN>); redo unless $answer eq 'yes' || $answer eq 'no'; } This will ask a series of yes or no questions. If the answer is neither 'yes' or 'no' then the question is re-displayed. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]