http://www.perlmonks.org?node_id=946290


in reply to Range Operator in If Statement

...or, you could reuse an existing function from Acme::Tools (or create your own function)
use warnings; use strict; use Acme::Tools qw(between); my $ref = 7; if (between($ref, 1, 8)) { print "between\n"; }