programming-examples/perl/Basics/Boolean operator.pl
2019-11-18 14:44:36 +01:00

15 lines
252 B
Perl

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";
}
}