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

12 lines
252 B
Perl

print "Please enter positive numbers up to 100\n";
while (<>) {
chomp;
if ($_ > 0 && $_ < 100) {
print "Thank you - let's have another!\n";
} else {
print "Please enter positive numbers up to 100\n";
}
}