TobeAutomated.pl my $count = 0; while ($count < 2) { $count ++; print "Question? y/n: "; chomp(my $answer = <>); print "You said `$answer`\n"; }