in reply to Range Operator in If Statement

In the TIMTOWTDI tradition, I offer Quantum::Superpositions (untested):
use Quantum::Superpositions; if ( $ref == any(1..8) ) {

            "Battle not with trolls, lest ye become a troll; and if you gaze into the Internet, the Internet gazes also into you."
        -Friedrich Nietzsche: A Dynamic Translation