That is a pretty acceptable way to do it, except I would change it to be the following:
You don't need all the excess parenthesis, just the one set. You are using the logical AND to separate the comparisons.
In case you are wondering if I tested this, here is the code I used to test it:
-
use strict;
-
use warnings;
-
-
my $x = 4;
-
my $y = 1;
-
my $z = 10;
-
-
if($x > $y && $x < $z){
-
print("Yes\n");
-
}
-
else{
-
print("No\n");
-
}
-
Regards,
Jeff