programming-examples/perl/_Basics/Boolean and &&.pl

12 lines
252 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
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";
}
}