in reply to querying a range of values
use 5.010; for my $frequency ( 1, 10 .. 17 ){ print $frequency, ' '; if ($frequency ~~ [ 10 .. 15 ]) {print "Yes"} print "\n"; } __END__ 1 10 Yes 11 Yes 12 Yes 13 Yes 14 Yes 15 Yes 16 17 [download]