programming-examples/perl/_Basics/Boolean and &&.pl
2019-11-15 12:59:38 +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";
}
}