Help for this page

Select Code to Download


  1. or download this
    if ($b == 1 || $b == 2 || $b == 3 || $b == 4 || $b == 5) {
       print "\$b is a number and is either 1, 2, 3, 4, or 5.";
    } else {
       print "\$b has to be a number and to be either 1, 2, 3, 4, or 5.";
    }
    
  2. or download this
    if ($b =~ /^\d$/ and $b > 0 and $b < 6) {
        ...
    }