use strict; my $r; until($r =~ /yea/i){ print "type in something:\n"; chomp(my $i = <>); print "you typed $i , is this correct? [yea or ney]\n"; chomp($r = <>); if ($r =~ /yea/i){ print "yuuuuuupiiiiiiiii !!\n"; } else { print "dough !!!\n" } }