programming-examples/perl/Statement/Use until to read user input.pl
2019-11-15 12:59:38 +01:00

9 lines
177 B
Perl

#!/usr/bin/perl
print "Are you o.k.? ";
chomp($answer=<STDIN>);
until ($answer eq "yes"){
sleep(1);
print "Are you o.k. yet? ";
chomp($answer=<STDIN>);
}