programming-examples/perl/Statement/Using a label without a loop and the redo statement.pl

9 lines
144 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!//usr/bin/perl
ATTEMPT: {
print "Yes/No? ";
chomp($answer = <STDIN>);
unless ($answer eq "yes"){
redo ATTEMPT ;
}
}