programming-examples/perl/Basics/Boolean operator.pl

15 lines
252 B
Perl
Raw Normal View History

2019-11-18 14:44:36 +01:00
print "Please enter numbers from 5 to 10\n";
while (<>) {
chop;
if ($_ < 5 || $_ > 10) {
print "Please enter numbers from 5 to 10\n";
} else {
print "Thank you - let's have another!\n";
}
}