in reply to Is there an InString-like function?

If you feel you may one day port to a quantum computer, you might have the foresight to use the any function in Quantum::Superpositions

use Quantum::Superpositions; if ( $var == any(1 .. 5) ) {

HTH,
Charles K. Clarkson